This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: go command enhancements


> Can you make this part (the option to stop the network) fully 
> configurable, please?  i.e. don't scan for it, etc, unless there 
> is network support in place.

Yup, done.

--Mark

Index: redboot/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/redboot/current/ChangeLog,v
retrieving revision 1.102
diff -u -p -5 -r1.102 ChangeLog
--- redboot/current/ChangeLog	4 Apr 2003 15:41:16 -0000	1.102
+++ redboot/current/ChangeLog	4 Apr 2003 16:02:42 -0000
@@ -1,9 +1,10 @@
 2003-04-04  Mark Salter  <msalter at redhat dot com>
 
 	* 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 at mlbassoc dot com>
 
 	* src/load.c: Better handling of default download mode.  Also
Index: redboot/current/src/main.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/redboot/current/src/main.c,v
retrieving revision 1.42
diff -u -p -5 -r1.42 main.c
--- redboot/current/src/main.c	4 Apr 2003 15:41:16 -0000	1.42
+++ redboot/current/src/main.c	4 Apr 2003 16:02:42 -0000
@@ -422,11 +422,11 @@ 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;
     int  wait_time, res;
     bool cache_enabled = false;
@@ -438,13 +438,17 @@ do_go(int argc, char *argv[])
     entry = entry_address;  // Default from last 'load' operation
     init_opts(&opts[0], 'w', true, OPTION_ARG_TYPE_NUM, 
               (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;
     }
     if (wait_time_set) {
         int script_timeout_ms = wait_time * 1000;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]