Re: [Libguestfs] [PATCH] lib: command: Print command before running it with guestfs_int_cmd_pipe_run.

Pino Toscano
Mon, 11 Sep 2017 15:48:48 -0000

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