Changeset b74959bd in mainline for uspace/srv/vfs/vfs_open.c


Ignore:
Timestamp:
2007-11-20T21:33:32Z (17 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8498915
Parents:
3209923
Message:

Modify ipc_answer_*() to make use of all six syscall arguments. The recommended
means of answering calls is via the ipc_answer_m() macros (where m denotes the
number of return arguments) that automatically decide between the fast register
version or the slow universal version of ipc_answer().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/vfs/vfs_open.c

    r3209923 rb74959bd  
    4747{
    4848        if (!vfs_files_init()) {
    49                 ipc_answer_fast_0(rid, ENOMEM);
     49                ipc_answer_0(rid, ENOMEM);
    5050                return;
    5151        }
     
    6161
    6262        ipc_callid_t callid;
    63         ipc_call_t call;
    6463
    65         if (!ipc_data_receive(&callid, &call, NULL, &size)) {
    66                 ipc_answer_fast_0(callid, EINVAL);
    67                 ipc_answer_fast_0(rid, EINVAL);
     64        if (!ipc_data_receive(&callid, NULL, &size)) {
     65                ipc_answer_0(callid, EINVAL);
     66                ipc_answer_0(rid, EINVAL);
    6867                return;
    6968        }
     
    7877       
    7978        if (!path) {
    80                 ipc_answer_fast_0(callid, ENOMEM);
    81                 ipc_answer_fast_0(rid, ENOMEM);
     79                ipc_answer_0(callid, ENOMEM);
     80                ipc_answer_0(rid, ENOMEM);
    8281                return;
    8382        }
    8483
    8584        int rc;
    86         if ((rc = ipc_data_deliver(callid, &call, path, size))) {
    87                 ipc_answer_fast_0(rid, rc);
     85        if ((rc = ipc_data_deliver(callid, path, size))) {
     86                ipc_answer_0(rid, rc);
    8887                free(path);
    8988                return;
     
    104103        if (rc) {
    105104                futex_up(&unlink_futex);
    106                 ipc_answer_fast_0(rid, rc);
     105                ipc_answer_0(rid, rc);
    107106                free(path);
    108107                return;
     
    124123        if (fd < 0) {
    125124                vfs_node_put(node);
    126                 ipc_answer_fast_0(rid, fd);
     125                ipc_answer_0(rid, fd);
    127126                return;
    128127        }
     
    143142         * Success! Return the new file descriptor to the client.
    144143         */
    145         ipc_answer_fast_1(rid, EOK, fd);
     144        ipc_answer_1(rid, EOK, fd);
    146145}
    147146
Note: See TracChangeset for help on using the changeset viewer.