Changeset 1433ecda in mainline for uspace/app/usbinfo/main.c
- Timestamp:
- 2018-04-04T15:42:37Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2c4e1cc
- Parents:
- 47b2d7e3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/usbinfo/main.c
r47b2d7e3 r1433ecda 80 80 81 81 static struct option long_options[] = { 82 { "help", no_argument, NULL, 'h'},83 { "identification", no_argument, NULL, 'i'},84 { "list", no_argument, NULL, 'l'},85 { "match-ids", no_argument, NULL, 'm'},86 { "descriptor-tree", no_argument, NULL, 't'},87 { "descriptor-tree-full", no_argument, NULL, 'T'},88 { "strings", no_argument, NULL, 's'},89 { "status", no_argument, NULL, 'S'},90 { "hid-report", no_argument, NULL, 'r'},91 { "hid-report-usages", no_argument, NULL, 'R'},92 { 0, 0, NULL, 0}82 { "help", no_argument, NULL, 'h' }, 83 { "identification", no_argument, NULL, 'i' }, 84 { "list", no_argument, NULL, 'l' }, 85 { "match-ids", no_argument, NULL, 'm' }, 86 { "descriptor-tree", no_argument, NULL, 't' }, 87 { "descriptor-tree-full", no_argument, NULL, 'T' }, 88 { "strings", no_argument, NULL, 's' }, 89 { "status", no_argument, NULL, 'S' }, 90 { "hid-report", no_argument, NULL, 'r' }, 91 { "hid-report-usages", no_argument, NULL, 'R' }, 92 { 0, 0, NULL, 0 } 93 93 }; 94 94 static const char *short_options = "hilmtTsSrR"; … … 158 158 short_options, long_options, NULL); 159 159 switch (opt) { 160 case -1: 161 break; 162 case 'l': 163 list(); 164 break; 165 case '?': 166 print_usage(argv[0]); 167 return 1; 168 case 'h': 169 print_usage(argv[0]); 170 return 0; 171 default: 172 idx = 0; 173 while (actions[idx].opt != 0) { 174 if (actions[idx].opt == opt) { 175 actions[idx].active = true; 176 something_active = true; 177 break; 178 } 179 idx++; 160 case -1: 161 break; 162 case 'l': 163 list(); 164 break; 165 case '?': 166 print_usage(argv[0]); 167 return 1; 168 case 'h': 169 print_usage(argv[0]); 170 return 0; 171 default: 172 idx = 0; 173 while (actions[idx].opt != 0) { 174 if (actions[idx].opt == opt) { 175 actions[idx].active = true; 176 something_active = true; 177 break; 180 178 } 181 break; 179 idx++; 180 } 181 break; 182 182 } 183 183 } while (opt > 0);
Note:
See TracChangeset
for help on using the changeset viewer.