linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: tytso@mit.edu
Cc: linux-ext4@vger.kernel.org, Jan Kara <jack@suse.cz>
Subject: [PATCH] e2fsck: Improve error message when device name misspelled
Date: Wed,  8 Sep 2010 16:12:08 +0200	[thread overview]
Message-ID: <1283955128-6517-1-git-send-email-jack@suse.cz> (raw)

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>
---
 e2fsck/unix.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

  Ted, would you please include this minor improvement? One of our users
complained about it. Thanks.

diff --git a/e2fsck/unix.c b/e2fsck/unix.c
index 6cb2214..7eb269c 100644
--- a/e2fsck/unix.c
+++ b/e2fsck/unix.c
@@ -1109,6 +1109,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.6.4.2


             reply	other threads:[~2010-09-08 14:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-08 14:12 Jan Kara [this message]
2010-09-20  2:56 ` [PATCH] e2fsck: Improve error message when device name misspelled Ted Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1283955128-6517-1-git-send-email-jack@suse.cz \
    --to=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).