Changeset 918e1e84 in mainline


Ignore:
Timestamp:
2013-01-15T20:01:29Z (11 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ef4e8eb
Parents:
16b64b8
Message:

usbinfo: Remove the old way to list devices.

File:
1 edited

Legend:

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

    r16b64b8 r918e1e84  
    4444#include <devman.h>
    4545#include <loc.h>
    46 #include <usb/dev/hub.h>
    47 #include <usb/hc.h>
    4846#include <usb_iface.h>
    4947
     
    6058{
    6159        printf("  Device %02d: %s\n", addr, path);
    62 }
    63 
    64 static void print_hc_devices(devman_handle_t hc_handle)
    65 {
    66         int rc;
    67         usb_hc_connection_t conn;
    68 
    69         usb_hc_connection_initialize(&conn, hc_handle);
    70         rc = usb_hc_connection_open(&conn);
    71         if (rc != EOK) {
    72                 printf(NAME ": failed to connect to HC: %s.\n",
    73                     str_error(rc));
    74                 return;
    75         }
    76         usb_address_t addr;
    77         for (addr = 1; addr < MAX_USB_ADDRESS; addr++) {
    78                 devman_handle_t dev_handle;
    79                 rc = usb_hc_get_handle_by_address(&conn, addr, &dev_handle);
    80                 if (rc != EOK) {
    81                         continue;
    82                 }
    83                 char path[MAX_PATH_LENGTH];
    84                 rc = devman_fun_get_path(dev_handle, path, MAX_PATH_LENGTH);
    85                 if (rc != EOK) {
    86                         continue;
    87                 }
    88                 print_found_dev(addr, path);
    89         }
    90         usb_hc_connection_close(&conn);
    9160}
    9261
     
    155124        for (unsigned i = 0; i < count; ++i) {
    156125                devman_handle_t hc_handle = 0;
    157                 int rc = usb_ddf_get_hc_handle_by_sid(svcs[i], &hc_handle);
     126                int rc = devman_fun_sid_to_handle(svcs[i], &hc_handle);
    158127                if (rc != EOK) {
    159128                        printf(NAME ": Error resolving handle of HC with SID %"
     
    169138                }
    170139                print_found_hc(svcs[i], path);
    171                 (void)print_hc_devices;
    172140
    173141                // TODO replace this with something sane
Note: See TracChangeset for help on using the changeset viewer.