Changeset 50ba203 in mainline for uspace/app/usbinfo/info.c
- Timestamp:
- 2011-02-20T15:46:48Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6bb83c7
- Parents:
- d81ef61c (diff), 0c00dac (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/usbinfo/info.c
rd81ef61c r50ba203 39 39 #include <usb/usbdrv.h> 40 40 #include <usb/pipes.h> 41 #include <usb/recognise.h> 41 42 #include <usb/request.h> 42 43 #include "usbinfo.h" … … 47 48 usb_device_connection_t wire; 48 49 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);72 50 73 51 /* … … 95 73 goto leave; 96 74 } 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); 97 89 98 90 /* … … 141 133 leave: 142 134 /* Ignoring errors here. */ 143 async_hangup(hc_phone);144 135 usb_endpoint_pipe_end_session(&ctrl_pipe); 145 136
Note:
See TracChangeset
for help on using the changeset viewer.