Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset b4cbef1 in mainline for uspace/srv/loader/main.c


Ignore:
Timestamp:
2010-02-03T16:52:37Z (12 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master
Children:
3b3e776, eda925a
Parents:
472c09d
Message:

add minimal data size check into async_data_receive
introduce more convenience wrappers for common IPC patterns:

async_data_read_forward_fast
async_data_void
async_data_forward_fast

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/loader/main.c

    r472c09d rb4cbef1  
    230230static void ldr_set_files(ipc_callid_t rid, ipc_call_t *request)
    231231{
    232         void *buf;
     232        fdi_node_t *buf;
    233233        size_t buf_size;
    234         int rc = async_data_receive(&buf, 0, sizeof(fdi_node_t), &buf_size);
     234        int rc = async_data_receive(&buf, 0, 0, sizeof(fdi_node_t), &buf_size);
    235235       
    236236        if (rc == EOK) {
     
    252252                int i;
    253253                for (i = 0; i < count; i++)
    254                         _filv[i] = &((fdi_node_t *) buf)[i];
     254                        _filv[i] = &buf[i];
    255255               
    256256                _filv[count] = NULL;
     
    266266               
    267267                filc = count;
    268                 fil_buf = (fdi_node_t *) buf;
     268                fil_buf = buf;
    269269                filv = _filv;
    270270        }
Note: See TracChangeset for help on using the changeset viewer.