Changeset 03e02248 in mainline


Ignore:
Timestamp:
2010-12-12T13:10:31Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7ed5b576
Parents:
02ccfcd
Message:

App `usbinfo' dumps possible match ids

Location:
uspace/app/usbinfo
Files:
3 edited

Legend:

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

    r02ccfcd r03e02248  
    6969}
    7070
     71void dump_match_ids(match_id_list_t *matches)
     72{
     73        printf("Match ids:\n");
     74        link_t *link;
     75        for (link = matches->ids.next;
     76            link != &matches->ids;
     77            link = link->next) {
     78                match_id_t *match = list_get_instance(link, match_id_t, link);
     79
     80                printf(INDENT "%d %s\n", match->score, match->id);
     81        }
     82}
     83
    7184void dump_standard_device_descriptor(usb_standard_device_descriptor_t *d)
    7285{
  • uspace/app/usbinfo/main.c

    r02ccfcd r03e02248  
    112112
    113113        /*
     114         * Dump information about possible match ids.
     115         */
     116        match_id_list_t match_id_list;
     117        init_match_ids(&match_id_list);
     118        rc = usb_drv_create_device_match_ids(hc_phone, &match_id_list, address);
     119        if (rc != EOK) {
     120                fprintf(stderr,
     121                    NAME ": failed to fetch match ids of the device: %s.\n",
     122                    str_error(rc));
     123                return rc;
     124        }
     125        dump_match_ids(&match_id_list);
     126
     127        /*
    114128         * Get device descriptor and dump it.
    115129         */
  • uspace/app/usbinfo/usbinfo.h

    r02ccfcd r03e02248  
    3939#include <usb/descriptor.h>
    4040#include <usb/debug.h>
     41#include <ipc/devman.h>
    4142
    4243
     
    4445
    4546void dump_buffer(const char *, const uint8_t *, size_t);
     47void dump_match_ids(match_id_list_t *matches);
    4648void dump_standard_device_descriptor(usb_standard_device_descriptor_t *);
    4749void dump_standard_configuration_descriptor(int,
Note: See TracChangeset for help on using the changeset viewer.