Changeset 46577995 in mainline for uspace/drv/char/i8042/i8042.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/drv/char/i8042/i8042.c

    rfacacc71 r46577995  
    6868
    6969static void i8042_char_conn(ipc_callid_t, ipc_call_t *, void *);
    70 static int i8042_read(chardev_srv_t *, void *, size_t, size_t *);
    71 static int i8042_write(chardev_srv_t *, const void *, size_t, size_t *);
     70static errno_t i8042_read(chardev_srv_t *, void *, size_t, size_t *);
     71static errno_t i8042_write(chardev_srv_t *, const void *, size_t, size_t *);
    7272
    7373static chardev_ops_t i8042_chardev_ops = {
     
    129129{
    130130        i8042_t *controller = ddf_dev_data_get(dev);
    131         int rc;
     131        errno_t rc;
    132132       
    133133        const uint8_t status = IPC_GET_ARG1(*call);
     
    158158 *
    159159 */
    160 int i8042_init(i8042_t *dev, addr_range_t *regs, int irq_kbd,
     160errno_t i8042_init(i8042_t *dev, addr_range_t *regs, int irq_kbd,
    161161    int irq_mouse, ddf_dev_t *ddf_dev)
    162162{
     
    170170        i8042_regs_t *ar;
    171171       
    172         int rc;
     172        errno_t rc;
    173173        bool kbd_bound = false;
    174174        bool aux_bound = false;
     
    350350 *
    351351 */
    352 static int i8042_write(chardev_srv_t *srv, const void *data, size_t size,
     352static errno_t i8042_write(chardev_srv_t *srv, const void *data, size_t size,
    353353    size_t *nwr)
    354354{
     
    385385 *
    386386 */
    387 static int i8042_read(chardev_srv_t *srv, void *dest, size_t size,
     387static errno_t i8042_read(chardev_srv_t *srv, void *dest, size_t size,
    388388    size_t *nread)
    389389{
     
    391391        size_t p;
    392392        uint8_t *destp = (uint8_t *)dest;
    393         int rc;
     393        errno_t rc;
    394394       
    395395        fibril_mutex_lock(&port->buf_lock);
Note: See TracChangeset for help on using the changeset viewer.