Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/usbinfo/main.c

    r5debe97 r3e6a98c5  
    198198
    199199                /* The initialization is here only to make compiler happy. */
    200                 devman_handle_t handle = 0;
    201                 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);
    202204                if (rc != EOK) {
    203205                        fprintf(stderr, NAME ": device `%s' not found "
     
    207209                }
    208210
    209                 usb_device_t *usb_dev = usb_device_create(handle);
    210 
    211                 if (usb_dev == NULL) {
     211                usbinfo_device_t *dev = prepare_device(devpath,
     212                    hc_handle, dev_addr);
     213                if (dev == NULL) {
    212214                        continue;
    213215                }
     
    219221                while (actions[action].opt != 0) {
    220222                        if (actions[action].active) {
    221                                 actions[action].action(usb_dev);
     223                                actions[action].action(dev);
    222224                        }
    223225                        action++;
    224226                }
    225227
    226                 usb_device_destroy(usb_dev);
     228                /* Destroy the control pipe (close the session etc.). */
     229                destroy_device(dev);
    227230        }
    228231
Note: See TracChangeset for help on using the changeset viewer.