[Libguestfs] [PATCH] ntfsresize: Capture errors sent to stdout (RHBZ#1166618).
Pino Toscano
ptoscano at redhat.com
Mon Nov 24 18:04:00 UTC 2014
On Monday 24 November 2014 11:00:37 Richard W.M. Jones wrote:
> ntfsresize sends error messages to stdout. Capture those error
> messages.
> ---
> daemon/ntfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/daemon/ntfs.c b/daemon/ntfs.c
> index aef45a2..762ca88 100644
> --- a/daemon/ntfs.c
> +++ b/daemon/ntfs.c
> @@ -94,7 +94,7 @@ do_ntfsresize (const char *device, int64_t size, int
> force) ADD_ARG (argv, i, device);
> ADD_ARG (argv, i, NULL);
>
> - r = commandv (NULL, &err, argv);
> + r = commandvf (NULL, &err, COMMAND_FLAG_FOLD_STDOUT_ON_STDERR, argv);
> if (r == -1) {
> reply_with_error ("%s: %s", device, err);
> return -1;
LGTM.
--
Pino Toscano
More information about the Libguestfs
mailing list