Richard W.M. Jones
2014-Nov-24 11:00 UTC
[Libguestfs] [PATCH] ntfsresize: Capture errors sent to stdout (RHBZ#1166618).
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; -- 2.1.0
Pino Toscano
2014-Nov-24 18:04 UTC
Re: [Libguestfs] [PATCH] ntfsresize: Capture errors sent to stdout (RHBZ#1166618).
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
Apparently Analagous Threads
- [PATCH] Fix a bug in e2fsck execution code
- [PATCH] daemon: fold xfs_admin stdout to stderr
- [PATCH] daemon: improve internal commandrvf
- [PATCH] daemon: improve debugging for "stdout on stderr" flag
- [PATCH v3 2/6] daemon: Split out command() functions and CLEANUP_* macros into separate files.