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

    rfacacc71 r46577995  
    5555 *
    5656 */
    57 static int get_my_registers(ddf_dev_t *dev, addr_range_t *p_io_reg,
     57static errno_t get_my_registers(ddf_dev_t *dev, addr_range_t *p_io_reg,
    5858    int *kbd_irq, int *mouse_irq)
    5959{
     
    6666        hw_res_list_parsed_t hw_resources;
    6767        hw_res_list_parsed_init(&hw_resources);
    68         const int ret = hw_res_get_list_parsed(parent_sess, &hw_resources, 0);
     68        const errno_t ret = hw_res_get_list_parsed(parent_sess, &hw_resources, 0);
    6969        if (ret != EOK)
    7070                return ret;
     
    9696 *
    9797 */
    98 static int i8042_dev_add(ddf_dev_t *device)
     98static errno_t i8042_dev_add(ddf_dev_t *device)
    9999{
    100100        addr_range_t io_regs;
    101101        int kbd = 0;
    102102        int mouse = 0;
    103         int rc;
     103        errno_t rc;
    104104       
    105105        if (!device)
Note: See TracChangeset for help on using the changeset viewer.