From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 2/3] ARM boot[zu]: return COMMAND_ERROR_USAGE instead of calling barebox_cmd_usage
Date: Mon, 27 Feb 2012 20:24:52 +0100 [thread overview]
Message-ID: <1330370693-1591-3-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1330370693-1591-1-git-send-email-s.hauer@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/lib/bootu.c | 6 ++----
arch/arm/lib/bootz.c | 6 ++----
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/arch/arm/lib/bootu.c b/arch/arm/lib/bootu.c
index 89d793a..d93c5fa 100644
--- a/arch/arm/lib/bootu.c
+++ b/arch/arm/lib/bootu.c
@@ -12,10 +12,8 @@ static int do_bootu(struct command *cmdtp, int argc, char *argv[])
void *kernel = NULL;
void *oftree = NULL;
- if (argc != 2) {
- barebox_cmd_usage(cmdtp);
- return 1;
- }
+ if (argc != 2)
+ return COMMAND_ERROR_USAGE;
fd = open(argv[1], O_RDONLY);
if (fd > 0)
diff --git a/arch/arm/lib/bootz.c b/arch/arm/lib/bootz.c
index 40facf6..dcfedbc 100644
--- a/arch/arm/lib/bootz.c
+++ b/arch/arm/lib/bootz.c
@@ -31,10 +31,8 @@ static int do_bootz(struct command *cmdtp, int argc, char *argv[])
int usemap = 0;
struct memory_bank *bank = list_first_entry(&memory_banks, struct memory_bank, list);
- if (argc != 2) {
- barebox_cmd_usage(cmdtp);
- return 1;
- }
+ if (argc != 2)
+ return COMMAND_ERROR_USAGE;
fd = open(argv[1], O_RDONLY);
if (fd < 0) {
--
1.7.9.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2012-02-27 19:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-27 19:24 [PATCH] some binary space reduction Sascha Hauer
2012-02-27 19:24 ` [PATCH 1/3] command: do not allow abbreviated commands anymore Sascha Hauer
2012-02-27 19:24 ` Sascha Hauer [this message]
2012-02-27 19:24 ` [PATCH 3/3] commands: remove struct command pointer from commands Sascha Hauer
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=1330370693-1591-3-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/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