linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] mkfs.ubifs: check output first
@ 2010-06-17  8:42 Shevchenko Andriy (EXT-Teleca/Helsinki)
  2010-06-17  8:42 ` [PATCH 2/3] flash_eraseall: move constants out of for loop Shevchenko Andriy (EXT-Teleca/Helsinki)
  0 siblings, 1 reply; 8+ messages in thread
From: Shevchenko Andriy (EXT-Teleca/Helsinki) @ 2010-06-17  8:42 UTC (permalink / raw)
  To: Bityutskiy Artem (Nokia-D/Helsinki)
  Cc: Shevchenko Andriy (EXT-Teleca/Helsinki)

Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
---
 mkfs.ubifs/mkfs.ubifs.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/mkfs.ubifs/mkfs.ubifs.c b/mkfs.ubifs/mkfs.ubifs.c
index e4b4e3c..9061453 100644
--- a/mkfs.ubifs/mkfs.ubifs.c
+++ b/mkfs.ubifs/mkfs.ubifs.c
@@ -647,8 +647,11 @@ static int get_options(int argc, char**argv)
 
 	if (optind != argc && !output)
 		output = strdup(argv[optind]);
-	if (output)
-		out_ubi = !open_ubi(output);
+
+	if (!output)
+		return err_msg("not output device or file specified");
+
+	out_ubi = !open_ubi(output);
 
 	if (out_ubi) {
 		c->min_io_size = c->di.min_io_size;
@@ -656,9 +659,6 @@ static int get_options(int argc, char**argv)
 		c->max_leb_cnt = c->vi.rsvd_lebs;
 	}
 
-	if (!output)
-		return err_msg("not output device or file specified");
-
 	if (c->min_io_size == -1)
 		return err_msg("min. I/O unit was not specified "
 			       "(use -h for help)");
-- 
1.6.3.3

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

end of thread, other threads:[~2010-06-24  0:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-17  8:42 [PATCH 1/3] mkfs.ubifs: check output first Shevchenko Andriy (EXT-Teleca/Helsinki)
2010-06-17  8:42 ` [PATCH 2/3] flash_eraseall: move constants out of for loop Shevchenko Andriy (EXT-Teleca/Helsinki)
2010-06-17  8:42   ` [PATCH 3/3] flash_eraseall: make -? option the same as --help Shevchenko Andriy (EXT-Teleca/Helsinki)
2010-06-22 17:31     ` Mike Frysinger
2010-06-22 17:33   ` [PATCH 2/3] flash_eraseall: move constants out of for loop Mike Frysinger
2010-06-23  0:23     ` Jamie Lokier
2010-06-23  2:11       ` Mike Frysinger
2010-06-24  0:39         ` Jamie Lokier

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