From 32f66cc791f597a3522607b233cefc4f1e673fc1 Mon Sep 17 00:00:00 2001 From: Jan Kara Date: Wed, 8 Sep 2010 16:12:08 +0200 Subject: [PATCH] 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 --- e2fsck/unix.c | 2 ++ 1 file changed, 2 insertions(+) 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 " -- 1.8.3.1