Changes in uspace/app/usbinfo/main.c [bdddc9d:3e6a98c5] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/usbinfo/main.c
rbdddc9d r3e6a98c5 43 43 #include <devman.h> 44 44 #include <loc.h> 45 #include <usb/hc.h> 45 46 #include <usb/dev.h> 46 47 #include <usb/dev/pipes.h> … … 197 198 198 199 /* The initialization is here only to make compiler happy. */ 199 devman_handle_t handle = 0; 200 int rc = usb_resolve_device_handle(devpath, &handle); 200 devman_handle_t hc_handle = 0; 201 usb_address_t dev_addr = 0; 202 int rc = usb_resolve_device_handle(devpath, 203 &hc_handle, &dev_addr, NULL); 201 204 if (rc != EOK) { 202 205 fprintf(stderr, NAME ": device `%s' not found " … … 206 209 } 207 210 208 usb_device_t *usb_dev = usb_device_create(handle); 209 210 if (usb_dev == NULL) { 211 fprintf(stderr, NAME ": device `%s' not found " 212 "or not of USB kind, skipping.\n", 213 devpath); 211 usbinfo_device_t *dev = prepare_device(devpath, 212 hc_handle, dev_addr); 213 if (dev == NULL) { 214 214 continue; 215 215 } … … 221 221 while (actions[action].opt != 0) { 222 222 if (actions[action].active) { 223 actions[action].action( usb_dev);223 actions[action].action(dev); 224 224 } 225 225 action++; 226 226 } 227 227 228 usb_device_destroy(usb_dev); 228 /* Destroy the control pipe (close the session etc.). */ 229 destroy_device(dev); 229 230 } 230 231
Note:
See TracChangeset
for help on using the changeset viewer.