Ignore:
Timestamp:
2011-01-31T20:32:33Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
37cf3792
Parents:
4fe94c66 (diff), 197ef43 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/generic/remote_char_dev.c

    r4fe94c66 r12573db  
    3333 */
    3434
    35 #include <ipc/ipc.h>
    3635#include <async.h>
    3736#include <errno.h>
     
    8180        if (!async_data_read_receive(&cid, &len)) {
    8281                /* TODO handle protocol error. */
    83                 ipc_answer_0(callid, EINVAL);
     82                async_answer_0(callid, EINVAL);
    8483                return;
    8584        }
     
    8786        if (!char_dev_ops->read) {
    8887                async_data_read_finalize(cid, NULL, 0);
    89                 ipc_answer_0(callid, ENOTSUP);
     88                async_answer_0(callid, ENOTSUP);
    9089                return;
    9190        }
     
    10099                /* Some error occured. */
    101100                async_data_read_finalize(cid, buf, 0);
    102                 ipc_answer_0(callid, ret);
     101                async_answer_0(callid, ret);
    103102                return;
    104103        }
     
    106105        /* The operation was successful, return the number of data read. */
    107106        async_data_read_finalize(cid, buf, ret);
    108         ipc_answer_1(callid, EOK, ret);
     107        async_answer_1(callid, EOK, ret);
    109108}
    110109
     
    128127        if (!async_data_write_receive(&cid, &len)) {
    129128                /* TODO handle protocol error. */
    130                 ipc_answer_0(callid, EINVAL);
     129                async_answer_0(callid, EINVAL);
    131130                return;
    132131        }
     
    134133        if (!char_dev_ops->write) {
    135134                async_data_write_finalize(cid, NULL, 0);
    136                 ipc_answer_0(callid, ENOTSUP);
     135                async_answer_0(callid, ENOTSUP);
    137136                return;
    138137        }
     
    148147        if (ret < 0) {
    149148                /* Some error occured. */
    150                 ipc_answer_0(callid, ret);
     149                async_answer_0(callid, ret);
    151150        } else {
    152151                /*
     
    154153                 * written.
    155154                 */
    156                 ipc_answer_1(callid, EOK, ret);
     155                async_answer_1(callid, EOK, ret);
    157156        }
    158157}
Note: See TracChangeset for help on using the changeset viewer.