[Libguestfs] [PATCH] Fix a bug in e2fsck execution code
Richard W.M. Jones
rjones at redhat.com
Wed Feb 18 14:43:38 UTC 2015
On Wed, Feb 18, 2015 at 03:59:48PM +0200, Nikos Skalkotos wrote:
> Use commandrvf() instead of commandvf() to execute e2fsck. A non-zero
> exit status does not always indicate a failure.
>
> Signed-off-by: Nikos Skalkotos <skalkoto at grnet.gr>
> ---
> daemon/ext2.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/daemon/ext2.c b/daemon/ext2.c
> index 65ddae6..8ef6d5f 100644
> --- a/daemon/ext2.c
> +++ b/daemon/ext2.c
> @@ -296,9 +296,9 @@ do_e2fsck (const char *device,
> ADD_ARG (argv, i, device);
> ADD_ARG (argv, i, NULL);
>
> - r = commandvf (NULL, &err,
> - COMMAND_FLAG_FOLD_STDOUT_ON_STDERR,
> - argv);
> + r = commandrvf (NULL, &err,
> + COMMAND_FLAG_FOLD_STDOUT_ON_STDERR,
> + argv);
> /* 0 = no errors, 1 = errors corrected.
> *
> * >= 4 means uncorrected or other errors.
Oops.
I will push this in a moment, thanks.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages. http://libguestfs.org
More information about the Libguestfs
mailing list