Ignore:
File:
1 edited

Legend:

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

    reda925a rb3d513f  
    475475static void cons_write(console_t *cons, ipc_callid_t rid, ipc_call_t *request)
    476476{
    477         void *buf;
     477        ipc_callid_t callid;
    478478        size_t size;
    479         int rc = async_data_write_accept(&buf, false, 0, 0, 0, &size);
    480        
    481         if (rc != EOK) {
    482                 ipc_answer_0(rid, rc);
     479        if (!async_data_write_receive(&callid, &size)) {
     480                ipc_answer_0(callid, EINVAL);
     481                ipc_answer_0(rid, EINVAL);
    483482                return;
    484483        }
     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);
    485493       
    486494        async_serialize_start();
Note: See TracChangeset for help on using the changeset viewer.