Changeset 46577995 in mainline for uspace/lib/c/include/io/con_srv.h


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/include/io/con_srv.h

    rfacacc71 r46577995  
    6767
    6868struct con_ops {
    69         int (*open)(con_srvs_t *, con_srv_t *);
    70         int (*close)(con_srv_t *);
    71         int (*read)(con_srv_t *, void *, size_t, size_t *);
    72         int (*write)(con_srv_t *, void *, size_t, size_t *);
     69        errno_t (*open)(con_srvs_t *, con_srv_t *);
     70        errno_t (*close)(con_srv_t *);
     71        errno_t (*read)(con_srv_t *, void *, size_t, size_t *);
     72        errno_t (*write)(con_srv_t *, void *, size_t, size_t *);
    7373        void (*sync)(con_srv_t *);
    7474        void (*clear)(con_srv_t *);
    7575        void (*set_pos)(con_srv_t *, sysarg_t col, sysarg_t row);
    76         int (*get_pos)(con_srv_t *, sysarg_t *, sysarg_t *);
    77         int (*get_size)(con_srv_t *, sysarg_t *, sysarg_t *);
    78         int (*get_color_cap)(con_srv_t *, console_caps_t *);
     76        errno_t (*get_pos)(con_srv_t *, sysarg_t *, sysarg_t *);
     77        errno_t (*get_size)(con_srv_t *, sysarg_t *, sysarg_t *);
     78        errno_t (*get_color_cap)(con_srv_t *, console_caps_t *);
    7979        void (*set_style)(con_srv_t *, console_style_t);
    8080        void (*set_color)(con_srv_t *, console_color_t, console_color_t,
     
    8282        void (*set_rgb_color)(con_srv_t *, pixel_t, pixel_t);
    8383        void (*set_cursor_visibility)(con_srv_t *, bool);
    84         int (*get_event)(con_srv_t *, cons_event_t *);
     84        errno_t (*get_event)(con_srv_t *, cons_event_t *);
    8585};
    8686
    8787extern void con_srvs_init(con_srvs_t *);
    8888
    89 extern int con_conn(ipc_callid_t, ipc_call_t *, con_srvs_t *);
     89extern errno_t con_conn(ipc_callid_t, ipc_call_t *, con_srvs_t *);
    9090
    9191#endif
Note: See TracChangeset for help on using the changeset viewer.