diff options
author | Wanlong Gao <gaowanlong@cn.fujitsu.com> | 2012-01-14 00:03:43 +0800 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-01-23 18:16:12 +0000 |
commit | 9e27ff8ed659380e2a3aad8a052fe229b2f2bd5f (patch) | |
tree | 8842e2c81458c5b581e8841fc74a2f5e182839a7 /daemon | |
parent | ae1e4758bd07de6666cdbe88ca052cbfc6a33a67 (diff) | |
download | libguestfs-9e27ff8ed659380e2a3aad8a052fe229b2f2bd5f.tar.gz libguestfs-9e27ff8ed659380e2a3aad8a052fe229b2f2bd5f.tar.xz libguestfs-9e27ff8ed659380e2a3aad8a052fe229b2f2bd5f.zip |
ext2: tweak the error returned message of resize2fs-M(BZ755729)
Tweak the error message "e2fsck -f" and "e2fsck -fy".
Indicate the user to use the correct and/or forceall options.
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
(cherry picked from commit 0eaf06e673833bc25673d5c3d2487fffae310285)
Diffstat (limited to 'daemon')
-rw-r--r-- | daemon/ext2.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/daemon/ext2.c b/daemon/ext2.c index f7889da4..f3d23300 100644 --- a/daemon/ext2.c +++ b/daemon/ext2.c @@ -275,9 +275,14 @@ do_resize2fs_M (const char *device) if (e2prog (prog) == -1) return -1; - r = command (NULL, &err, prog, "-M" , device, NULL); + r = command (NULL, &err, prog, "-M", device, NULL); if (r == -1) { - reply_with_error ("%s", err); + if (strstr (err, "e2fsck -f")) { + free (err); + reply_with_error ("you need to run e2fsck with the correct and/or forceall options first"); + } else { + reply_with_error ("%s", err); + } free (err); return -1; } |