linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] dumpe2fs: complain if extra arguments are given on the command line
@ 2014-08-25  3:59 Theodore Ts'o
  2014-08-25  3:59 ` [PATCH 2/5] resize2fs.8.in: clarify when on-line resizing is supported Theodore Ts'o
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Theodore Ts'o @ 2014-08-25  3:59 UTC (permalink / raw)
  To: Ext4 Developers List; +Cc: Theodore Ts'o

Addresses-Debian-Bug: #758074

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 misc/dumpe2fs.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/misc/dumpe2fs.c b/misc/dumpe2fs.c
index cc18ad8..1eae5a3 100644
--- a/misc/dumpe2fs.c
+++ b/misc/dumpe2fs.c
@@ -575,8 +575,10 @@ int main (int argc, char ** argv)
 			usage();
 		}
 	}
-	if (optind > argc - 1)
+	if (argc - 1 > optind) {
 		usage();
+		exit(1);
+	}
 	device_name = argv[optind++];
 	flags = EXT2_FLAG_JOURNAL_DEV_OK | EXT2_FLAG_SOFTSUPP_FEATURES | EXT2_FLAG_64BITS;
 	if (force)
-- 
2.1.0


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

end of thread, other threads:[~2014-08-25  3:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-25  3:59 [PATCH 1/5] dumpe2fs: complain if extra arguments are given on the command line Theodore Ts'o
2014-08-25  3:59 ` [PATCH 2/5] resize2fs.8.in: clarify when on-line resizing is supported Theodore Ts'o
2014-08-25  3:59 ` [PATCH 3/5] resize2fs: clarify the size of blocks in resize2fs's messages Theodore Ts'o
2014-08-25  3:59 ` [PATCH 4/5] mke2fs.8.in: explain how the fs-size parameter is interpreted Theodore Ts'o
2014-08-25  3:59 ` [PATCH 5/5] mke2fs: improve the error message when a non-existent file is specified Theodore 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).