From: Jan Kara Date: Wed, 8 Sep 2010 14:12:08 +0000 (+0200) Subject: e2fsck: Improve error message when device name misspelled X-Git-Tag: v1.41.13~33 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=32f66cc791f597a3522607b233cefc4f1e673fc1;p=tools%2Fe2fsprogs.git e2fsck: Improve error message when device name misspelled When a device name is misspelled, we output the full text about specifying alternate superblock. This is slightly misleading because when the device cannot be open because of ENOENT, this certainly won't help. So just print that device does not exist and exit. Signed-off-by: Jan Kara Signed-off-by: Theodore Ts'o --- diff --git a/e2fsck/unix.c b/e2fsck/unix.c index 4a299ef..cc3c39d 100644 --- a/e2fsck/unix.c +++ b/e2fsck/unix.c @@ -1102,6 +1102,8 @@ failure: else if (retval == EBUSY) printf(_("Filesystem mounted or opened exclusively " "by another program?\n")); + else if (retval == ENOENT) + printf(_("Possibly non-existent device?\n")); #ifdef EROFS else if (retval == EROFS) printf(_("Disk write-protected; use the -n option "