public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] mkfs.ubifs: check output first
@ 2011-04-04  8:21 Andy Shevchenko
  2011-04-04  8:23 ` Artem Bityutskiy
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2011-04-04  8:21 UTC (permalink / raw)
  To: linux-mtd, Bityutskiy Artem (Nokia-MS/Helsinki); +Cc: Andy Shevchenko

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 bc0817f..9f3c5e0 100644
--- a/mkfs.ubifs/mkfs.ubifs.c
+++ b/mkfs.ubifs/mkfs.ubifs.c
@@ -675,8 +675,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;
@@ -684,9 +687,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] 2+ messages in thread

* Re: [PATCH] mkfs.ubifs: check output first
  2011-04-04  8:21 [PATCH] mkfs.ubifs: check output first Andy Shevchenko
@ 2011-04-04  8:23 ` Artem Bityutskiy
  0 siblings, 0 replies; 2+ messages in thread
From: Artem Bityutskiy @ 2011-04-04  8:23 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: linux-mtd

On Mon, 2011-04-04 at 11:21 +0300, Andy Shevchenko wrote:
> Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
> ---
>  mkfs.ubifs/mkfs.ubifs.c |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)

Added the following commit message:
"Artem: this is jut a clean-up, no functional changes."
and pushed to mtd-utils.git, thanks!

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

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

end of thread, other threads:[~2011-04-04  8:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-04  8:21 [PATCH] mkfs.ubifs: check output first Andy Shevchenko
2011-04-04  8:23 ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox