Changeset 46577995 in mainline for uspace/srv/volsrv/volsrv.c


Ignore:
Timestamp:
2018-01-04T20:50:52Z (7 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/srv/volsrv/volsrv.c

    rfacacc71 r46577995  
    5454static void vol_client_conn(ipc_callid_t, ipc_call_t *, void *);
    5555
    56 static int vol_init(void)
    57 {
    58         int rc;
     56static errno_t vol_init(void)
     57{
     58        errno_t rc;
    5959        log_msg(LOG_DEFAULT, LVL_DEBUG, "vol_init()");
    6060
     
    9090        size_t size;
    9191        size_t act_size;
    92         int rc;
     92        errno_t rc;
    9393
    9494        if (!async_data_read_receive(&callid, &size)) {
     
    112112        }
    113113
    114         int retval = async_data_read_finalize(callid, id_buf, size);
     114        errno_t retval = async_data_read_finalize(callid, id_buf, size);
    115115        free(id_buf);
    116116
     
    121121{
    122122        service_id_t sid;
    123         int rc;
     123        errno_t rc;
    124124
    125125        sid = IPC_GET_ARG1(*icall);
     
    139139        vol_part_t *part;
    140140        vol_part_info_t pinfo;
    141         int rc;
     141        errno_t rc;
    142142
    143143        sid = IPC_GET_ARG1(*icall);
     
    185185        service_id_t sid;
    186186        vol_part_t *part;
    187         int rc;
     187        errno_t rc;
    188188
    189189        sid = IPC_GET_ARG1(*icall);
     
    209209        vol_fstype_t fstype;
    210210        vol_label_supp_t vlsupp;
    211         int rc;
     211        errno_t rc;
    212212
    213213        fstype = IPC_GET_ARG1(*icall);
     
    249249        vol_fstype_t fstype;
    250250        char *label;
    251         int rc;
     251        errno_t rc;
    252252
    253253        sid = IPC_GET_ARG1(*icall);
     
    327327int main(int argc, char *argv[])
    328328{
    329         int rc;
     329        errno_t rc;
    330330
    331331        printf("%s: Volume service\n", NAME);
Note: See TracChangeset for help on using the changeset viewer.