Changeset b23e9cc in mainline
- Timestamp:
- 2011-05-07T14:59:10Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 561f41b, 76ef94e
- Parents:
- 7205209 (diff), faf498d (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. - Location:
- uspace
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/usbinfo/dev.c
r7205209 rb23e9cc 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
r7205209 rb23e9cc 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
r7205209 rb23e9cc 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 -
uspace/lib/drv/generic/remote_usbhc.c
r7205209 rb23e9cc 302 302 async_transaction_t *trans = async_transaction_create(callid); 303 303 if (trans == NULL) { 304 async_answer_0(data_callid, ENOMEM); 304 305 async_answer_0(callid, ENOMEM); 305 306 return; … … 314 315 315 316 if (rc != EOK) { 317 async_answer_0(data_callid, rc); 316 318 async_answer_0(callid, rc); 317 319 async_transaction_destroy(trans); … … 460 462 async_transaction_t *trans = async_transaction_create(callid); 461 463 if (trans == NULL) { 464 async_answer_0(data_callid, ENOMEM); 462 465 async_answer_0(callid, ENOMEM); 463 466 free(setup_packet); … … 469 472 trans->buffer = malloc(data_len); 470 473 if (trans->buffer == NULL) { 474 async_answer_0(data_callid, ENOMEM); 471 475 async_answer_0(callid, ENOMEM); 472 476 async_transaction_destroy(trans); … … 480 484 481 485 if (rc != EOK) { 486 async_answer_0(data_callid, rc); 482 487 async_answer_0(callid, rc); 483 488 async_transaction_destroy(trans);
Note:
See TracChangeset
for help on using the changeset viewer.