Richard W.M. Jones
2017-Sep-11 15:07 UTC
[Libguestfs] [PATCH] lib: command: Print command before running it with guestfs_int_cmd_pipe_run.
Unlike ordinary guestfs_int_cmd_run, the pipe version did not print the command it was about to run when debugging was enabled. Fixes commit e98bb8692929a037f3452686719504aea31f311d. --- lib/command.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/command.c b/lib/command.c index 970acf6e5..bc469de59 100644 --- a/lib/command.c +++ b/lib/command.c @@ -791,6 +791,9 @@ guestfs_int_cmd_pipe_run (struct command *cmd, const char *mode) finish_command (cmd); + if (cmd->g->verbose) + debug_command (cmd); + /* Various options cannot be used here. */ assert (!cmd->capture_errors); assert (!cmd->stdout_callback); -- 2.13.2
Pino Toscano
2017-Sep-11 15:48 UTC
Re: [Libguestfs] [PATCH] lib: command: Print command before running it with guestfs_int_cmd_pipe_run.
In data lunedì 11 settembre 2017 16:07:56 CEST, Richard W.M. Jones ha scritto:> Unlike ordinary guestfs_int_cmd_run, the pipe version did not print > the command it was about to run when debugging was enabled. > > Fixes commit e98bb8692929a037f3452686719504aea31f311d. > --- > lib/command.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/lib/command.c b/lib/command.c > index 970acf6e5..bc469de59 100644 > --- a/lib/command.c > +++ b/lib/command.c > @@ -791,6 +791,9 @@ guestfs_int_cmd_pipe_run (struct command *cmd, const char *mode) > > finish_command (cmd); > > + if (cmd->g->verbose) > + debug_command (cmd); > + > /* Various options cannot be used here. */ > assert (!cmd->capture_errors); > assert (!cmd->stdout_callback);LGTM. -- Pino Toscano
Apparently Analagous Threads
- [PATCH 1/6] cmd: add a way to run (and wait) asynchronously commands
- [PATCH 0/7] copy-in/copy-out: Capture errors from tar subprocess (RHBZ#1267032).
- Re: [PATCH 6/6] lib: Use guestfs_int_make_temp_path in a few more places.
- [libguestfs PATCH] lib: remove guestfs_int_cmd_clear_close_files()
- [PATCH 0/7 v2] Make copy_in & copy_out APIs, and use copy_in in customize