Changes in / [b23e9cc:7205209] in mainline
- Location:
- uspace
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/usbinfo/dev.c
rb23e9cc r7205209 40 40 #include "usbinfo.h" 41 41 42 usbinfo_device_t *prepare_device( const char *name,43 devman_handle_t hc_handle,usb_address_t dev_addr)42 usbinfo_device_t *prepare_device(devman_handle_t hc_handle, 43 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 device %s: %s.\n",58 name,str_error(rc));57 NAME ": failed to create connection to the device: %s.\n", 58 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 to %s: %s.\n",67 name,str_error(rc));66 NAME ": failed to create default control pipe: %s.\n", 67 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 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 } 73 fprintf(stderr, 74 NAME ": probing default control pipe failed: %s.\n", 75 str_error(rc)); 82 76 goto leave; 83 77 } … … 90 84 if (rc != EOK) { 91 85 fprintf(stderr, 92 NAME ": failed to retrieve device descriptor of %s: %s.\n",93 name,str_error(rc));86 NAME ": failed to retrieve device descriptor: %s.\n", 87 str_error(rc)); 94 88 goto leave; 95 89 } … … 99 93 &dev->full_configuration_descriptor_size); 100 94 if (rc != EOK) { 101 fprintf(stderr, NAME ": " \102 "failed to retrieve configuration descriptor of %s: %s.\n",103 name,str_error(rc));95 fprintf(stderr, 96 NAME ": failed to retrieve configuration descriptor: %s.\n", 97 str_error(rc)); 104 98 goto leave; 105 99 } -
uspace/app/usbinfo/main.c
rb23e9cc r7205209 308 308 } 309 309 310 usbinfo_device_t *dev = prepare_device(devpath, 311 hc_handle, dev_addr); 310 usbinfo_device_t *dev = prepare_device(hc_handle, dev_addr); 312 311 if (dev == NULL) { 313 312 continue; -
uspace/app/usbinfo/usbinfo.h
rb23e9cc r7205209 71 71 } 72 72 73 usbinfo_device_t *prepare_device( const char *,devman_handle_t, usb_address_t);73 usbinfo_device_t *prepare_device(devman_handle_t, usb_address_t); 74 74 void destroy_device(usbinfo_device_t *); 75 75 -
uspace/lib/drv/generic/remote_usbhc.c
rb23e9cc r7205209 302 302 async_transaction_t *trans = async_transaction_create(callid); 303 303 if (trans == NULL) { 304 async_answer_0(data_callid, ENOMEM);305 304 async_answer_0(callid, ENOMEM); 306 305 return; … … 315 314 316 315 if (rc != EOK) { 317 async_answer_0(data_callid, rc);318 316 async_answer_0(callid, rc); 319 317 async_transaction_destroy(trans); … … 462 460 async_transaction_t *trans = async_transaction_create(callid); 463 461 if (trans == NULL) { 464 async_answer_0(data_callid, ENOMEM);465 462 async_answer_0(callid, ENOMEM); 466 463 free(setup_packet); … … 472 469 trans->buffer = malloc(data_len); 473 470 if (trans->buffer == NULL) { 474 async_answer_0(data_callid, ENOMEM);475 471 async_answer_0(callid, ENOMEM); 476 472 async_transaction_destroy(trans); … … 484 480 485 481 if (rc != EOK) { 486 async_answer_0(data_callid, rc);487 482 async_answer_0(callid, rc); 488 483 async_transaction_destroy(trans);
Note:
See TracChangeset
for help on using the changeset viewer.