Changes in uspace/app/usbinfo/main.c [32260a0:9d58539] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/usbinfo/main.c
r32260a0 r9d58539 62 62 63 63 _OPTION("-h --help", "Print this help and exit."); 64 _OPTION("-l --list", "Print a list of host controllers and devices.");65 64 _OPTION("-i --identification", "Brief device identification."); 66 65 _OPTION("-m --match-ids", "Print match ids generated for the device."); … … 83 82 {"help", no_argument, NULL, 'h'}, 84 83 {"identification", no_argument, NULL, 'i'}, 85 {"list", no_argument, NULL, 'l'},86 84 {"match-ids", no_argument, NULL, 'm'}, 87 85 {"descriptor-tree", no_argument, NULL, 't'}, … … 93 91 {0, 0, NULL, 0} 94 92 }; 95 static const char *short_options = "hi lmtTsSrR";93 static const char *short_options = "himtTsSrR"; 96 94 97 95 static usbinfo_action_t actions[] = { … … 148 146 } 149 147 150 bool something_active = false;151 148 /* 152 149 * Process command-line options. They determine what shall be … … 159 156 switch (opt) { 160 157 case -1: 161 break;162 case 'l':163 list();164 158 break; 165 159 case '?': … … 174 168 if (actions[idx].opt == opt) { 175 169 actions[idx].active = true; 176 something_active = true;177 170 break; 178 171 } … … 185 178 186 179 /* Set the default action. */ 180 int idx = 0; 181 bool something_active = false; 182 while (actions[idx].opt != 0) { 183 if (actions[idx].active) { 184 something_active = true; 185 break; 186 } 187 idx++; 188 } 187 189 if (!something_active) { 188 190 actions[0].active = true;
Note:
See TracChangeset
for help on using the changeset viewer.