Changeset 4265fd4 in mainline


Ignore:
Timestamp:
2011-03-30T13:16:25Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0876062
Parents:
4ae90f9
Message:

More robust error checking in devman client

Add checking for failure during sending of match ids.

printf() removed because that is not allowed inside serialized section.

File:
1 edited

Legend:

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

    r4ae90f9 r4265fd4  
    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);
    151149                        return ret;
    152150                }
     
    195193        }
    196194       
    197         devman_send_match_ids(phone, match_ids);
     195        int match_ids_rc = devman_send_match_ids(phone, match_ids);
    198196       
    199197        async_wait_for(req, &retval);
     
    201199        async_serialize_end();
    202200       
     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
    203206        if (retval == EOK)
    204207                fun_handle = (int) IPC_GET_ARG1(answer);
Note: See TracChangeset for help on using the changeset viewer.