Changeset 06f9a9c9 in mainline for uspace/app/usbinfo/main.c


Ignore:
Timestamp:
2013-01-27T13:17:49Z (11 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e2dfa86
Parents:
5b401b9
Message:

usbinfo: Switch to library provided usb_device_t.

File:
1 edited

Legend:

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

    r5b401b9 r06f9a9c9  
    198198
    199199                /* 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;
    202201                int rc = usb_resolve_device_handle(devpath,
    203                     &hc_handle, &dev_addr, NULL);
     202                    NULL, NULL, &handle);
    204203                if (rc != EOK) {
    205204                        fprintf(stderr, NAME ": device `%s' not found "
     
    209208                }
    210209
    211                 usbinfo_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) {
    214213                        continue;
    215214                }
     
    221220                while (actions[action].opt != 0) {
    222221                        if (actions[action].active) {
    223                                 actions[action].action(dev);
     222                                actions[action].action(usb_dev);
    224223                        }
    225224                        action++;
    226225                }
    227226
    228                 /* Destroy the control pipe (close the session etc.). */
    229                 destroy_device(dev);
     227                usb_device_destroy(usb_dev);
    230228        }
    231229
Note: See TracChangeset for help on using the changeset viewer.