Changeset 67b6fc5 in mainline for uspace/app/usbinfo/info.c


Ignore:
Timestamp:
2011-02-12T03:23:39Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
600733e
Parents:
e0df6c2 (diff), 8f5b6561 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Development branch merge

File:
1 edited

Legend:

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

    re0df6c2 r67b6fc5  
    3939#include <usb/usbdrv.h>
    4040#include <usb/pipes.h>
     41#include <usb/recognise.h>
    4142#include <usb/request.h>
    4243#include "usbinfo.h"
     
    4748        usb_device_connection_t wire;
    4849        usb_endpoint_pipe_t ctrl_pipe;
    49         ctrl_pipe.hc_phone = -1;
    50 
    51         int hc_phone = devman_device_connect(hc_handle, 0);
    52         if (hc_phone < 0) {
    53                 fprintf(stderr,
    54                     NAME ": failed to connect to host controller (%zu): %s.\n",
    55                         (size_t) hc_handle, str_error(hc_phone));
    56                 return hc_phone;
    57         }
    58 
    59         /*
    60          * Dump information about possible match ids.
    61          */
    62         match_id_list_t match_id_list;
    63         init_match_ids(&match_id_list);
    64         rc = usb_drv_create_device_match_ids(hc_phone, &match_id_list, address);
    65         if (rc != EOK) {
    66                 fprintf(stderr,
    67                     NAME ": failed to fetch match ids of the device: %s.\n",
    68                     str_error(rc));
    69                 goto leave;
    70         }
    71         dump_match_ids(&match_id_list);
    7250
    7351        /*
     
    9573                goto leave;
    9674        }
     75
     76        /*
     77         * Dump information about possible match ids.
     78         */
     79        match_id_list_t match_id_list;
     80        init_match_ids(&match_id_list);
     81        rc = usb_device_create_match_ids(&ctrl_pipe, &match_id_list);
     82        if (rc != EOK) {
     83                fprintf(stderr,
     84                    NAME ": failed to fetch match ids of the device: %s.\n",
     85                    str_error(rc));
     86                goto leave;
     87        }
     88        dump_match_ids(&match_id_list);
    9789
    9890        /*
     
    141133leave:
    142134        /* Ignoring errors here. */
    143         async_hangup(hc_phone);
    144135        usb_endpoint_pipe_end_session(&ctrl_pipe);
    145136
Note: See TracChangeset for help on using the changeset viewer.