linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] e2fsck: Improve error message when device name misspelled
@ 2010-09-08 14:12 Jan Kara
  2010-09-20  2:56 ` Ted Ts'o
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Kara @ 2010-09-08 14:12 UTC (permalink / raw)
  To: tytso; +Cc: linux-ext4, Jan Kara

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] e2fsck: Improve error message when device name misspelled
  2010-09-08 14:12 [PATCH] e2fsck: Improve error message when device name misspelled Jan Kara
@ 2010-09-20  2:56 ` Ted Ts'o
  0 siblings, 0 replies; 2+ messages in thread
From: Ted Ts'o @ 2010-09-20  2:56 UTC (permalink / raw)
  To: Jan Kara; +Cc: linux-ext4

On Wed, Sep 08, 2010 at 04:12:08PM +0200, Jan Kara wrote:
> 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>

Applied, thanks for the patch!

					- Ted

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-09-20  2:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-08 14:12 [PATCH] e2fsck: Improve error message when device name misspelled Jan Kara
2010-09-20  2:56 ` Ted Ts'o

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).