Changeset 46577995 in mainline for uspace/lib/nic/src/nic_ev.c


Ignore:
Timestamp:
2018-01-04T20:50:52Z (8 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Children:
e211ea04
Parents:
facacc71
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-04 20:47:53)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-04 20:50:52)
Message:

Use errno_t in all uspace and kernel code.

Change type of every variable, parameter and return value that holds an
<errno.h> constant to either errno_t (the usual case), or sys_errno_t
(some places in kernel). This is for the purpose of self-documentation,
as well as for type-checking with a bit of type definition hackery.

After this commit, HelenOS is free of code that mixes error codes with non-error
values on the assumption that error codes are negative.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/nic/src/nic_ev.c

    rfacacc71 r46577995  
    4242
    4343/** Device address changed. */
    44 int nic_ev_addr_changed(async_sess_t *sess, const nic_address_t *addr)
     44errno_t nic_ev_addr_changed(async_sess_t *sess, const nic_address_t *addr)
    4545{
    4646        async_exch_t *exch = async_exchange_begin(sess);
     
    4848        ipc_call_t answer;
    4949        aid_t req = async_send_0(exch, NIC_EV_ADDR_CHANGED, &answer);
    50         int retval = async_data_write_start(exch, addr,
     50        errno_t retval = async_data_write_start(exch, addr,
    5151            sizeof(nic_address_t));
    5252
     
    6363
    6464/** Device state changed. */
    65 int nic_ev_device_state(async_sess_t *sess, sysarg_t state)
     65errno_t nic_ev_device_state(async_sess_t *sess, sysarg_t state)
    6666{
    67         int rc;
     67        errno_t rc;
    6868
    6969        async_exch_t *exch = async_exchange_begin(sess);
     
    7575
    7676/** Frame received. */
    77 int nic_ev_received(async_sess_t *sess, void *data, size_t size)
     77errno_t nic_ev_received(async_sess_t *sess, void *data, size_t size)
    7878{
    7979        async_exch_t *exch = async_exchange_begin(sess);
     
    8181        ipc_call_t answer;
    8282        aid_t req = async_send_0(exch, NIC_EV_RECEIVED, &answer);
    83         int retval = async_data_write_start(exch, data, size);
     83        errno_t retval = async_data_write_start(exch, data, size);
    8484
    8585        async_exchange_end(exch);
Note: See TracChangeset for help on using the changeset viewer.