Changes in / [b23e9cc:7205209] in mainline


Ignore:
Location:
uspace
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/usbinfo/dev.c

    rb23e9cc r7205209  
    4040#include "usbinfo.h"
    4141
    42 usbinfo_device_t *prepare_device(const char *name,
    43     devman_handle_t hc_handle, usb_address_t dev_addr)
     42usbinfo_device_t *prepare_device(devman_handle_t hc_handle,
     43    usb_address_t dev_addr)
    4444{
    4545        usbinfo_device_t *dev = malloc(sizeof(usbinfo_device_t));
     
    5555        if (rc != EOK) {
    5656                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));
    5959                goto leave;
    6060        }
     
    6464        if (rc != EOK) {
    6565                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));
    6868                goto leave;
    6969        }
     
    7171        rc = usb_pipe_probe_default_control(&dev->ctrl_pipe);
    7272        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));
    8276                goto leave;
    8377        }
     
    9084        if (rc != EOK) {
    9185                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));
    9488                goto leave;
    9589        }
     
    9993            &dev->full_configuration_descriptor_size);
    10094        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));
    10498                goto leave;
    10599        }
  • uspace/app/usbinfo/main.c

    rb23e9cc r7205209  
    308308                }
    309309
    310                 usbinfo_device_t *dev = prepare_device(devpath,
    311                     hc_handle, dev_addr);
     310                usbinfo_device_t *dev = prepare_device(hc_handle, dev_addr);
    312311                if (dev == NULL) {
    313312                        continue;
  • uspace/app/usbinfo/usbinfo.h

    rb23e9cc r7205209  
    7171}
    7272
    73 usbinfo_device_t *prepare_device(const char *, devman_handle_t, usb_address_t);
     73usbinfo_device_t *prepare_device(devman_handle_t, usb_address_t);
    7474void destroy_device(usbinfo_device_t *);
    7575
  • uspace/lib/drv/generic/remote_usbhc.c

    rb23e9cc r7205209  
    302302        async_transaction_t *trans = async_transaction_create(callid);
    303303        if (trans == NULL) {
    304                 async_answer_0(data_callid, ENOMEM);
    305304                async_answer_0(callid, ENOMEM);
    306305                return;
     
    315314
    316315        if (rc != EOK) {
    317                 async_answer_0(data_callid, rc);
    318316                async_answer_0(callid, rc);
    319317                async_transaction_destroy(trans);
     
    462460        async_transaction_t *trans = async_transaction_create(callid);
    463461        if (trans == NULL) {
    464                 async_answer_0(data_callid, ENOMEM);
    465462                async_answer_0(callid, ENOMEM);
    466463                free(setup_packet);
     
    472469        trans->buffer = malloc(data_len);
    473470        if (trans->buffer == NULL) {
    474                 async_answer_0(data_callid, ENOMEM);
    475471                async_answer_0(callid, ENOMEM);
    476472                async_transaction_destroy(trans);
     
    484480
    485481        if (rc != EOK) {
    486                 async_answer_0(data_callid, rc);
    487482                async_answer_0(callid, rc);
    488483                async_transaction_destroy(trans);
Note: See TracChangeset for help on using the changeset viewer.