Changeset 46577995 in mainline for uspace/lib/c/generic/io/con_srv.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/c/generic/io/con_srv.c

    rfacacc71 r46577995  
    4242#include <io/con_srv.h>
    4343
    44 static int console_ev_encode(cons_event_t *event, ipc_call_t *call)
     44static errno_t console_ev_encode(cons_event_t *event, ipc_call_t *call)
    4545{
    4646        IPC_SET_ARG1(*call, event->type);
     
    7171        void *buf;
    7272        size_t size;
    73         int rc;
     73        errno_t rc;
    7474        ipc_callid_t rcallid;
    7575
     
    113113        void *data;
    114114        size_t size;
    115         int rc;
     115        errno_t rc;
    116116
    117117        rc = async_data_write_accept(&data, false, 0, 0, 0, &size);
     
    178178    ipc_call_t *call)
    179179{
    180         int rc;
     180        errno_t rc;
    181181        sysarg_t col;
    182182        sysarg_t row;
     
    194194    ipc_call_t *call)
    195195{
    196         int rc;
     196        errno_t rc;
    197197        sysarg_t cols;
    198198        sysarg_t rows;
     
    210210    ipc_call_t *call)
    211211{
    212         int rc;
     212        errno_t rc;
    213213        console_caps_t ccap;
    214214
     
    295295    ipc_call_t *call)
    296296{
    297         int rc;
     297        errno_t rc;
    298298        cons_event_t event;
    299299        ipc_call_t result;
     
    340340}
    341341
    342 int con_conn(ipc_callid_t iid, ipc_call_t *icall, con_srvs_t *srvs)
     342errno_t con_conn(ipc_callid_t iid, ipc_call_t *icall, con_srvs_t *srvs)
    343343{
    344344        con_srv_t *srv;
    345         int rc;
     345        errno_t rc;
    346346
    347347        /* Accept the connection */
Note: See TracChangeset for help on using the changeset viewer.