]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
e2fsck: Improve error message when device name misspelled
authorJan Kara <jack@suse.cz>
Wed, 8 Sep 2010 14:12:08 +0000 (16:12 +0200)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 20 Sep 2010 02:54:58 +0000 (22:54 -0400)
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 <jack@suse.cz>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
e2fsck/unix.c

index 4a299ef2a6e7b2c02c0baf01fb07ebc1ad1afe7b..cc3c39ded2e6714c8deb8f441370faab6e5c1e68 100644 (file)
@@ -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 "