mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
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>
This commit is contained in:
committed by
Richard W.M. Jones
parent
f6db1ec410
commit
0eaf06e673
@@ -277,9 +277,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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user