Changeset 84a1a54 in mainline for uspace/srv/vfs/vfs.c


Ignore:
Timestamp:
2018-01-04T20:47:53Z (6 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Children:
facacc71
Parents:
cde999a
Message:

Wrap returns of errno from main() with EXIT_RC().

Returns of error code from main() prevent type checking when errno_t
and int are considered incompatible. In order to avoid the philosophical
discussion of what should and shouldn't be returned for main(), we simply
wrap the error values and leave the answer to the question for future
generations to decide.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/vfs/vfs.c

    rcde999a r84a1a54  
    9898                printf("%s: Failed to initialize VFS node hash table\n",
    9999                    NAME);
    100                 return ENOMEM;
     100                return EXIT_RC(ENOMEM);
    101101        }
    102102       
     
    108108        if (plb == AS_MAP_FAILED) {
    109109                printf("%s: Cannot create address space area\n", NAME);
    110                 return ENOMEM;
     110                return EXIT_RC(ENOMEM);
    111111        }
    112112        memset(plb, 0, PLB_SIZE);
     
    125125        if (rc != EOK) {
    126126                printf("%s: Cannot create pager port: %s\n", NAME, str_error(rc));
    127                 return rc;
     127                return EXIT_RC(rc);
    128128        }
    129129
     
    145145        if (rc != EOK) {
    146146                printf("%s: Cannot register VFS service: %s\n", NAME, str_error(rc));
    147                 return rc;
     147                return EXIT_RC(rc);
    148148        }
    149149       
Note: See TracChangeset for help on using the changeset viewer.