diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2011-09-29 16:08:20 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2011-09-29 16:08:20 +0100 |
commit | 4e9ed018475ff4bd5171ed50a47ffae7abbdda4b (patch) | |
tree | ac06e592865f42a150f8b1b88429afa86657d23e | |
parent | d020350c3131f5d0e422f502b4810025a6fc0f11 (diff) | |
download | libguestfs-4e9ed018475ff4bd5171ed50a47ffae7abbdda4b.tar.gz libguestfs-4e9ed018475ff4bd5171ed50a47ffae7abbdda4b.tar.xz libguestfs-4e9ed018475ff4bd5171ed50a47ffae7abbdda4b.zip |
daemon: mkswap --help output changed, breaking linuxfsuuid group detection.
-rw-r--r-- | daemon/swap.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/daemon/swap.c b/daemon/swap.c index 99fb5639..c2fe13ae 100644 --- a/daemon/swap.c +++ b/daemon/swap.c @@ -43,8 +43,13 @@ optgroup_linuxfsuuid_available (void) char *err; int av; - /* Ignore return code - mkswap --help *will* fail. */ - ignore_value (command (NULL, &err, "mkswap", "--help", NULL)); + /* Upstream util-linux have been gradually changing '--help' to go + * from stderr to stdout, and changing the return code from 1 to 0. + * Thus we need to fold stdout and stderr together, and ignore the + * return code. + */ + ignore_value (commandf (NULL, &err, COMMAND_FLAG_FOLD_STDOUT_ON_STDERR, + "mkswap", "--help", NULL)); av = strstr (err, "-U") != NULL; free (err); |