[PATCH 2/3] ARM boot[zu]: return COMMAND_ERROR_USAGE instead of calling barebox_cmd_usage
Sascha Hauer
s.hauer at pengutronix.de
Mon Feb 27 14:24:52 EST 2012
Signed-off-by: Sascha Hauer <s.hauer at 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
More information about the barebox
mailing list