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


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/lib/c/include/bd.h

    rfacacc71 r46577995  
    4343} bd_t;
    4444
    45 extern int bd_open(async_sess_t *, bd_t **);
     45extern errno_t bd_open(async_sess_t *, bd_t **);
    4646extern void bd_close(bd_t *);
    47 extern int bd_read_blocks(bd_t *, aoff64_t, size_t, void *, size_t);
    48 extern int bd_read_toc(bd_t *, uint8_t, void *, size_t);
    49 extern int bd_write_blocks(bd_t *, aoff64_t, size_t, const void *, size_t);
    50 extern int bd_sync_cache(bd_t *, aoff64_t, size_t);
    51 extern int bd_get_block_size(bd_t *, size_t *);
    52 extern int bd_get_num_blocks(bd_t *, aoff64_t *);
     47extern errno_t bd_read_blocks(bd_t *, aoff64_t, size_t, void *, size_t);
     48extern errno_t bd_read_toc(bd_t *, uint8_t, void *, size_t);
     49extern errno_t bd_write_blocks(bd_t *, aoff64_t, size_t, const void *, size_t);
     50extern errno_t bd_sync_cache(bd_t *, aoff64_t, size_t);
     51extern errno_t bd_get_block_size(bd_t *, size_t *);
     52extern errno_t bd_get_num_blocks(bd_t *, aoff64_t *);
    5353
    5454#endif
Note: See TracChangeset for help on using the changeset viewer.