[Libguestfs] [PATCH] ntfsresize: Capture errors sent to stdout (RHBZ#1166618).

Richard W.M. Jones rjones at redhat.com
Mon Nov 24 11:00:37 UTC 2014


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




More information about the Libguestfs mailing list