diff options
author | Theodore Ts'o <tytso@mit.edu> | 2009-07-10 13:14:00 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2009-07-11 14:16:39 -0400 |
commit | 96cdb37e27ff101fb23cefe422b4f77fb55209be (patch) | |
tree | b58febb112cf08e9361c5581e2072d156543d17c /resize/main.c | |
parent | 0dc29161125fa4650e4b8832fc0f570435ef0fe3 (diff) | |
download | e2fsprogs-96cdb37e27ff101fb23cefe422b4f77fb55209be.tar.gz |
resize2fs: If resize2fs fails, tell the user to run e2fsck
If the resize operation fails in the middle of the operation, mark the
filesystem as needing to be checked, and tell the user that they
should run e2fsck -fy on the device.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'resize/main.c')
-rw-r--r-- | resize/main.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/resize/main.c b/resize/main.c index 2dae161b..c6cbb5e8 100644 --- a/resize/main.c +++ b/resize/main.c @@ -445,7 +445,8 @@ int main (int argc, char ** argv) device_name); exit(1); } - printf("Resizing the filesystem on %s to %u (%dk) blocks.\n", + printf(_("Resizing the filesystem on " + "%s to %u (%dk) blocks.\n"), device_name, new_size, fs->blocksize / 1024); retval = resize_fs(fs, &new_size, flags, ((flags & RESIZE_PERCENT_COMPLETE) ? @@ -455,7 +456,11 @@ int main (int argc, char ** argv) if (retval) { com_err(program_name, retval, _("while trying to resize %s"), device_name); - ext2fs_close (fs); + fprintf(stderr, + _("Please run 'e2fsck -fy %s' to fix the filesystem\n" + "after the aborted resize operation.\n"), + device_name); + ext2fs_close(fs); exit(1); } printf(_("The filesystem on %s is now %u blocks long.\n\n"), |