Changeset aad3587 in mainline for uspace/app/usbinfo/main.c
- Timestamp:
- 2011-03-17T23:10:26Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2d6787b
- Parents:
- 7b13d8e
- File:
-
- 1 edited
-
uspace/app/usbinfo/main.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/usbinfo/main.c
r7b13d8e raad3587 134 134 _OPTION("-m --match-ids", "Print match ids generated for the device."); 135 135 _OPTION("-t --descriptor-tree", "Print descriptor tree."); 136 _OPTION("-s --strings", "Try to print all string descriptors."); 136 137 137 138 printf("\n"); … … 148 149 {"match-ids", no_argument, NULL, 'm'}, 149 150 {"descriptor-tree", no_argument, NULL, 't'}, 151 {"strings", no_argument, NULL, 's'}, 150 152 {0, 0, NULL, 0} 151 153 }; 152 static const char *short_options = "himt ";154 static const char *short_options = "himts"; 153 155 154 156 int main(int argc, char *argv[]) … … 162 164 bool action_print_match_ids = false; 163 165 bool action_print_descriptor_tree = false; 166 bool action_print_strings = false; 164 167 165 168 /* … … 189 192 action_print_descriptor_tree = true; 190 193 break; 194 case 's': 195 action_print_strings = true; 196 break; 191 197 default: 192 198 assert(false && "unreachable code"); … … 198 204 if (!action_print_match_ids 199 205 && !action_print_short_identification 206 && !action_print_strings 200 207 && !action_print_descriptor_tree) { 201 208 action_print_short_identification = true; … … 239 246 dump_descriptor_tree_brief(dev); 240 247 } 248 if (action_print_strings) { 249 dump_strings(dev); 250 } 241 251 242 252 /* Destroy the control pipe (close the session etc.). */
Note:
See TracChangeset
for help on using the changeset viewer.
