Changeset 46577995 in mainline for uspace/app/mkfat/mkfat.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/app/mkfat/mkfat.c

    rfacacc71 r46577995  
    8686static void syntax_print(void);
    8787
    88 static int fat_params_compute(struct fat_cfg *cfg);
    89 static int fat_blocks_write(struct fat_cfg const *cfg, service_id_t service_id);
     88static errno_t fat_params_compute(struct fat_cfg *cfg);
     89static errno_t fat_blocks_write(struct fat_cfg const *cfg, service_id_t service_id);
    9090static void fat_bootsec_create(struct fat_cfg const *cfg, struct fat_bs *bs);
    9191
     
    9494        struct fat_cfg cfg;
    9595
    96         int rc;
     96        errno_t rc;
    9797        char *dev_path;
    9898        service_id_t service_id;
     
    252252}
    253253
    254 static int fat_label_encode(void *dest, const char *src)
     254static errno_t fat_label_encode(void *dest, const char *src)
    255255{
    256256        int i;
     
    284284 * file system params.
    285285 */
    286 static int fat_params_compute(struct fat_cfg *cfg)
     286static errno_t fat_params_compute(struct fat_cfg *cfg)
    287287{
    288288        uint32_t fat_bytes;
     
    356356
    357357/** Create file system with the given parameters. */
    358 static int fat_blocks_write(struct fat_cfg const *cfg, service_id_t service_id)
     358static errno_t fat_blocks_write(struct fat_cfg const *cfg, service_id_t service_id)
    359359{
    360360        aoff64_t addr;
     
    362362        int i;
    363363        uint32_t j;
    364         int rc;
     364        errno_t rc;
    365365        struct fat_bs bs;
    366366        fat_dentry_t *de;
Note: See TracChangeset for help on using the changeset viewer.