Changes in uspace/app/usbinfo/info.c [4e8e1f5:a12917e] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/usbinfo/info.c
r4e8e1f5 ra12917e 39 39 #include <usb/usbdrv.h> 40 40 #include <usb/pipes.h> 41 #include <usb/recognise.h>42 41 #include <usb/request.h> 43 42 #include "usbinfo.h" … … 48 47 usb_device_connection_t wire; 49 48 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); 50 72 51 73 /* … … 73 95 goto leave; 74 96 } 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);89 97 90 98 /* … … 133 141 leave: 134 142 /* Ignoring errors here. */ 143 ipc_hangup(hc_phone); 135 144 usb_endpoint_pipe_end_session(&ctrl_pipe); 136 145
Note:
See TracChangeset
for help on using the changeset viewer.