Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/devman.c

    re72fb34 r8b1e15ac  
    147147                ret = devman_send_match_id(phone, match_id);
    148148                if (ret != EOK) {
     149                        printf("Driver failed to send match id, error %d\n",
     150                            ret);
    149151                        return ret;
    150152                }
     
    193195        }
    194196       
    195         int match_ids_rc = devman_send_match_ids(phone, match_ids);
     197        devman_send_match_ids(phone, match_ids);
    196198       
    197199        async_wait_for(req, &retval);
     
    199201        async_serialize_end();
    200202       
    201         /* Prefer the answer to DEVMAN_ADD_FUNCTION in case of errors. */
    202         if ((match_ids_rc != EOK) && (retval == EOK)) {
    203                 retval = match_ids_rc;
    204         }
    205 
    206203        if (retval == EOK)
    207204                fun_handle = (int) IPC_GET_ARG1(answer);
     
    329326}
    330327
    331 int devman_device_get_handle_by_class(const char *classname,
    332     const char *devname, devman_handle_t *handle, unsigned int flags)
    333 {
    334         int phone = devman_get_phone(DEVMAN_CLIENT, flags);
    335 
    336         if (phone < 0)
    337                 return phone;
    338 
    339         async_serialize_start();
    340 
    341         ipc_call_t answer;
    342         aid_t req = async_send_1(phone, DEVMAN_DEVICE_GET_HANDLE_BY_CLASS,
    343             flags, &answer);
    344 
    345         sysarg_t retval = async_data_write_start(phone, classname,
    346             str_size(classname));
    347         if (retval != EOK) {
    348                 async_wait_for(req, NULL);
    349                 async_serialize_end();
    350                 return retval;
    351         }
    352         retval = async_data_write_start(phone, devname,
    353             str_size(devname));
    354         if (retval != EOK) {
    355                 async_wait_for(req, NULL);
    356                 async_serialize_end();
    357                 return retval;
    358         }
    359 
    360         async_wait_for(req, &retval);
    361 
    362         async_serialize_end();
    363 
    364         if (retval != EOK) {
    365                 if (handle != NULL)
    366                         *handle = (devman_handle_t) -1;
    367                 return retval;
    368         }
    369 
    370         if (handle != NULL)
    371                 *handle = (devman_handle_t) IPC_GET_ARG1(answer);
    372 
    373         return retval;
    374 }
    375 
    376328
    377329/** @}
Note: See TracChangeset for help on using the changeset viewer.