Changeset 06f9a9c9 in mainline for uspace/app/usbinfo/main.c
- Timestamp:
- 2013-01-27T13:17:49Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e2dfa86
- Parents:
- 5b401b9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/usbinfo/main.c
r5b401b9 r06f9a9c9 198 198 199 199 /* The initialization is here only to make compiler happy. */ 200 devman_handle_t hc_handle = 0; 201 usb_address_t dev_addr = 0; 200 devman_handle_t handle = 0; 202 201 int rc = usb_resolve_device_handle(devpath, 203 &hc_handle, &dev_addr, NULL);202 NULL, NULL, &handle); 204 203 if (rc != EOK) { 205 204 fprintf(stderr, NAME ": device `%s' not found " … … 209 208 } 210 209 211 usb info_device_t *dev = prepare_device(devpath,212 hc_handle, dev_addr); 213 if ( dev == NULL) {210 usb_device_t *usb_dev = usb_device_create(handle); 211 212 if (usb_dev == NULL) { 214 213 continue; 215 214 } … … 221 220 while (actions[action].opt != 0) { 222 221 if (actions[action].active) { 223 actions[action].action( dev);222 actions[action].action(usb_dev); 224 223 } 225 224 action++; 226 225 } 227 226 228 /* Destroy the control pipe (close the session etc.). */ 229 destroy_device(dev); 227 usb_device_destroy(usb_dev); 230 228 } 231 229
Note:
See TracChangeset
for help on using the changeset viewer.