Changeset 1433ecda in mainline for uspace/app/vuhid/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/vuhid/main.c
r47b2d7e3 r1433ecda 145 145 146 146 static struct option long_options[] = { 147 { "help", optional_argument, NULL, 'h'},148 { "controller", required_argument, NULL, 'c' },149 { "list", no_argument, NULL, 'l' },150 { 0, 0, NULL, 0}147 { "help", optional_argument, NULL, 'h' }, 148 { "controller", required_argument, NULL, 'c' }, 149 { "list", no_argument, NULL, 'l' }, 150 { 0, 0, NULL, 0 } 151 151 }; 152 152 static const char *short_options = "hc:l"; 153 153 154 static void print_help(const char * name, const char*module)154 static void print_help(const char *name, const char *module) 155 155 { 156 156 if (module == NULL) { … … 172 172 { 173 173 printf("Available devices:\n"); 174 for (vuhid_interface_t **i = available_hid_interfaces; *i != NULL; ++i) 175 { 174 for (vuhid_interface_t * *i = available_hid_interfaces; *i != NULL; ++i) { 176 175 printf("\t`%s'\t%s\n", (*i)->id, (*i)->name); 177 176 } … … 181 180 static const char *controller = DEFAULT_CONTROLLER; 182 181 183 int main(int argc, char * 182 int main(int argc, char *argv[]) 184 183 { 185 184 … … 191 190 int opt = 0; 192 191 while ((opt = getopt_long(argc, argv, short_options, long_options, NULL)) > 0) { 193 switch (opt) 194 { 192 switch (opt) { 195 193 case 'h': 196 194 print_help(*argv, optarg); … … 229 227 usb_log_debug("Found extra descriptor: %s.", 230 228 usb_debug_str_buffer( 231 232 233 229 hid_dev.descriptors->configuration->extra[i].data, 230 hid_dev.descriptors->configuration->extra[i].length, 231 0)); 234 232 } 235 233
Note:
See TracChangeset
for help on using the changeset viewer.