Changeset 28003 for branches/pap/Ohana/src/opihi/cmd.basic/opihi.c
- Timestamp:
- May 18, 2010, 12:49:05 PM (16 years ago)
- Location:
- branches/pap
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/pap
- Property svn:mergeinfo changed
-
branches/pap/Ohana
-
Property svn:mergeinfo
set to (toggle deleted branches)
/trunk/Ohana merged eligible /branches/eam_branches/Ohana.20100407 27635-27772 /branches/pap_delete/Ohana 27530-27595
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
branches/pap/Ohana/src/opihi/cmd.basic/opihi.c
r27255 r28003 3 3 int opihi_setmode (int argc, char **argv) { 4 4 5 intvalue;5 OpihiVerboseMode value; 6 6 7 7 if (argc < 2) { 8 gprint (GP_ERR, "USAGE: opihi (verbose) [on/off ]\n");8 gprint (GP_ERR, "USAGE: opihi (verbose) [on/off/error]\n"); 9 9 return (FALSE); 10 10 } … … 13 13 if (argc == 2) { 14 14 value = get_verbose_shell(); 15 if (value) { 16 gprint (GP_ERR, "opihi verbose mode: on\n"); 17 } else { 18 gprint (GP_ERR, "opihi verbose mode: off\n"); 19 } 15 switch (value) { 16 case OPIHI_VERBOSE_OFF: 17 gprint (GP_ERR, "opihi verbose mode: off\n"); 18 break; 19 case OPIHI_VERBOSE_ON: 20 gprint (GP_ERR, "opihi verbose mode: on\n"); 21 break; 22 case OPIHI_VERBOSE_ERROR: 23 gprint (GP_ERR, "opihi verbose mode: error\n"); 24 break; 25 default: 26 fprintf (stderr, "impossible condition\n"); 27 abort(); 28 } 20 29 return (TRUE); 21 30 } 22 31 if (!strcasecmp(argv[2], "on")) { 23 set_verbose_shell ( TRUE);32 set_verbose_shell (OPIHI_VERBOSE_ON); 24 33 return (TRUE); 25 34 } 26 35 if (!strcasecmp(argv[2], "off")) { 27 set_verbose_shell (FALSE); 36 set_verbose_shell (OPIHI_VERBOSE_OFF); 37 return (TRUE); 38 } 39 if (!strcasecmp(argv[2], "error")) { 40 set_verbose_shell (OPIHI_VERBOSE_ERROR); 28 41 return (TRUE); 29 42 }
Note:
See TracChangeset
for help on using the changeset viewer.
