summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2011-11-27 15:33:55 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2011-11-29 20:55:50 +0100
commit479c6e9506ecfe0b24407a9b3caefc3ed0c480d1 (patch)
tree635107bbd39f1eea6664aae465565455b7f8145e /commands
parent05b11670997997862ae18bb28ca70710afe75f95 (diff)
downloadbarebox-479c6e9506ecfe0b24407a9b3caefc3ed0c480d1.tar.gz
barebox-479c6e9506ecfe0b24407a9b3caefc3ed0c480d1.tar.xz
bootm: remove image handler options
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands')
-rw-r--r--commands/bootm.c55
1 files changed, 1 insertions, 54 deletions
diff --git a/commands/bootm.c b/commands/bootm.c
index 056ada52b0..9f3f354e66 100644
--- a/commands/bootm.c
+++ b/commands/bootm.c
@@ -142,25 +142,6 @@ static struct image_handle *get_fake_image_handle(struct image_data *data, int n
return handle;
}
-static int handler_parse_options(struct image_data *data, int opt, char *optarg)
-{
- struct image_handler *handler;
- int ret;
-
- list_for_each_entry(handler, &handler_list, list) {
- if (!handler->cmdline_parse)
- continue;
-
- ret = handler->cmdline_parse(data, opt, optarg);
- if (ret > 0)
- continue;
-
- return ret;
- }
-
- return -1;
-}
-
static int do_bootm(struct command *cmdtp, int argc, char *argv[])
{
int opt;
@@ -169,32 +150,15 @@ static int do_bootm(struct command *cmdtp, int argc, char *argv[])
struct image_handler *handler;
struct image_data data;
u32 initrd_start;
- char options[53]; /* worst case: whole alphabet with colons */
memset(&data, 0, sizeof(struct image_data));
data.verify = 1;
- /* Collect options from registered handlers */
- strcpy(options, "nhr:L:");
- list_for_each_entry(handler, &handler_list, list) {
- if (handler->cmdline_options)
- strcat(options, handler->cmdline_options);
- }
-
- while((opt = getopt(argc, argv, options)) > 0) {
+ while ((opt = getopt(argc, argv, "nr:L:")) > 0) {
switch(opt) {
case 'n':
data.verify = 0;
break;
- case 'h':
- printf("bootm advanced options:\n");
-
- list_for_each_entry(handler, &handler_list, list) {
- if (handler->help_string)
- printf("%s\n", handler->help_string);
- }
-
- return 0;
case 'L':
if (!data.initrd) {
eprintf("Warning -L ingnored. Specify the initrd first\n");
@@ -238,23 +202,6 @@ static int do_bootm(struct command *cmdtp, int argc, char *argv[])
goto err_out;
}
- optind = 0;
-
- while((opt = getopt(argc, argv, options)) > 0) {
- switch(opt) {
- case 'h':
- case 'n':
- case 'L':
- case 'r':
- break;
- default:
- if (!handler_parse_options(&data, opt, optarg))
- continue;
-
- return 1;
- }
- }
-
/*
* We have reached the point of no return: we are going to
* overwrite all exception vector code, so we cannot easily