Mercurial > flash_v2
changeset 908:6aa5728bb6a0
go command tweak
| author | msalter |
|---|---|
| date | Fri, 04 Apr 2003 16:03:43 +0000 |
| parents | a289defa82f0 |
| children | 97ac17e0e4de |
| files | packages/redboot/current/ChangeLog packages/redboot/current/src/main.c |
| diffstat | 2 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/redboot/current/ChangeLog +++ b/packages/redboot/current/ChangeLog @@ -2,6 +2,7 @@ 2003-04-04 Mark Salter <msalter@redhat * src/main.c (do_go): Add -n switch to optionally stop network device. Mask interrupts on all comm channels. + Don't scan for -n unless ethernet configured in. * doc/redboot_cmds.sgml: Update go command info. 2003-04-03 Gary Thomas <gary@mlbassoc.com>
--- a/packages/redboot/current/src/main.c +++ b/packages/redboot/current/src/main.c @@ -424,7 +424,7 @@ return_to_redboot(int status) void do_go(int argc, char *argv[]) { - int i, cur; + int i, cur, num_options; unsigned long entry; unsigned long oldints; bool wait_time_set; @@ -440,9 +440,13 @@ do_go(int argc, char *argv[]) (void **)&wait_time, (bool *)&wait_time_set, "wait timeout"); init_opts(&opts[1], 'c', false, OPTION_ARG_TYPE_FLG, (void **)&cache_enabled, (bool *)0, "go with caches enabled"); + num_options = 2; +#ifdef CYGPKG_IO_ETH_DRIVERS init_opts(&opts[2], 'n', false, OPTION_ARG_TYPE_FLG, (void **)&stop_net, (bool *)0, "go with network driver stopped"); - if (!scan_opts(argc, argv, 1, opts, 3, (void *)&entry, OPTION_ARG_TYPE_NUM, "starting address")) + num_options++; +#endif + if (!scan_opts(argc, argv, 1, opts, num_options, (void *)&entry, OPTION_ARG_TYPE_NUM, "starting address")) { return; }
