Changeset faf498d in mainline
- Timestamp:
- 2011-05-07T14:57:13Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 79784ef8, b23e9cc
- Parents:
- 6985b4e
- Location:
- uspace/app/usbinfo
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/usbinfo/dev.c
r6985b4e rfaf498d 40 40 #include "usbinfo.h" 41 41 42 usbinfo_device_t *prepare_device( devman_handle_t hc_handle,43 usb_address_t dev_addr)42 usbinfo_device_t *prepare_device(const char *name, 43 devman_handle_t hc_handle, usb_address_t dev_addr) 44 44 { 45 45 usbinfo_device_t *dev = malloc(sizeof(usbinfo_device_t)); … … 55 55 if (rc != EOK) { 56 56 fprintf(stderr, 57 NAME ": failed to create connection to the device: %s.\n",58 str_error(rc));57 NAME ": failed to create connection to device %s: %s.\n", 58 name, str_error(rc)); 59 59 goto leave; 60 60 } … … 64 64 if (rc != EOK) { 65 65 fprintf(stderr, 66 NAME ": failed to create default control pipe : %s.\n",67 str_error(rc));66 NAME ": failed to create default control pipe to %s: %s.\n", 67 name, str_error(rc)); 68 68 goto leave; 69 69 } … … 71 71 rc = usb_pipe_probe_default_control(&dev->ctrl_pipe); 72 72 if (rc != EOK) { 73 fprintf(stderr, 74 NAME ": probing default control pipe failed: %s.\n", 75 str_error(rc)); 73 if (rc == ENOENT) { 74 fprintf(stderr, NAME ": " \ 75 "device %s not present or malfunctioning.\n", 76 name); 77 } else { 78 fprintf(stderr, NAME ": " \ 79 "probing default control pipe of %s failed: %s.\n", 80 name, str_error(rc)); 81 } 76 82 goto leave; 77 83 } … … 84 90 if (rc != EOK) { 85 91 fprintf(stderr, 86 NAME ": failed to retrieve device descriptor : %s.\n",87 str_error(rc));92 NAME ": failed to retrieve device descriptor of %s: %s.\n", 93 name, str_error(rc)); 88 94 goto leave; 89 95 } … … 93 99 &dev->full_configuration_descriptor_size); 94 100 if (rc != EOK) { 95 fprintf(stderr, 96 NAME ": failed to retrieve configuration descriptor: %s.\n",97 str_error(rc));101 fprintf(stderr, NAME ": " \ 102 "failed to retrieve configuration descriptor of %s: %s.\n", 103 name, str_error(rc)); 98 104 goto leave; 99 105 } -
uspace/app/usbinfo/main.c
r6985b4e rfaf498d 308 308 } 309 309 310 usbinfo_device_t *dev = prepare_device(hc_handle, dev_addr); 310 usbinfo_device_t *dev = prepare_device(devpath, 311 hc_handle, dev_addr); 311 312 if (dev == NULL) { 312 313 continue; -
uspace/app/usbinfo/usbinfo.h
r6985b4e rfaf498d 71 71 } 72 72 73 usbinfo_device_t *prepare_device( devman_handle_t, usb_address_t);73 usbinfo_device_t *prepare_device(const char *, devman_handle_t, usb_address_t); 74 74 void destroy_device(usbinfo_device_t *); 75 75
Note:
See TracChangeset
for help on using the changeset viewer.