Changeset 827d73f in mainline for uspace/srv/hid/console/console.c


Ignore:
Timestamp:
2010-02-12T14:09:22Z (14 years ago)
Author:
Lukas Mejdrech <lukasmejdrech@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a70bda4
Parents:
918e9910 (diff), e70edd1 (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:

Merged the actual head

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/console/console.c

    r918e9910 r827d73f  
    475475static void cons_write(console_t *cons, ipc_callid_t rid, ipc_call_t *request)
    476476{
    477         ipc_callid_t callid;
     477        void *buf;
    478478        size_t size;
    479         if (!async_data_write_receive(&callid, &size)) {
    480                 ipc_answer_0(callid, EINVAL);
    481                 ipc_answer_0(rid, EINVAL);
     479        int rc = async_data_write_accept(&buf, false, 0, 0, 0, &size);
     480       
     481        if (rc != EOK) {
     482                ipc_answer_0(rid, rc);
    482483                return;
    483484        }
    484        
    485         char *buf = (char *) malloc(size);
    486         if (buf == NULL) {
    487                 ipc_answer_0(callid, ENOMEM);
    488                 ipc_answer_0(rid, ENOMEM);
    489                 return;
    490         }
    491        
    492         (void) async_data_write_finalize(callid, buf, size);
    493485       
    494486        async_serialize_start();
Note: See TracChangeset for help on using the changeset viewer.