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

    rfacacc71 r46577995  
    8585 * @return EOK on success or an error code
    8686 */
    87 static int sysinst_label_dev(const char *dev, char **pdev)
     87static errno_t sysinst_label_dev(const char *dev, char **pdev)
    8888{
    8989        fdisk_t *fdisk;
     
    9393        cap_spec_t cap;
    9494        service_id_t sid;
    95         int rc;
     95        errno_t rc;
    9696
    9797        printf("sysinst_label_dev(): get service ID '%s'\n", dev);
     
    154154 * @return EOK on success or an error code
    155155 */
    156 static int sysinst_fs_mount(const char *dev)
     156static errno_t sysinst_fs_mount(const char *dev)
    157157{
    158158        task_wait_t twait;
    159159        task_exit_t texit;
    160         int rc;
     160        errno_t rc;
    161161        int trc;
    162162
     
    193193 * @return EOK on success or an error code
    194194 */
    195 static int sysinst_copy_boot_files(void)
     195static errno_t sysinst_copy_boot_files(void)
    196196{
    197197        task_wait_t twait;
    198198        task_exit_t texit;
    199         int rc;
     199        errno_t rc;
    200200        int trc;
    201201
     
    260260 * @return EOK on success or an error code
    261261 */
    262 static int sysinst_copy_boot_blocks(const char *devp)
     262static errno_t sysinst_copy_boot_blocks(const char *devp)
    263263{
    264264        void *boot_img;
     
    272272        aoff64_t core_blocks;
    273273        grub_boot_blocklist_t *first_bl, *bl;
    274         int rc;
     274        errno_t rc;
    275275
    276276        printf("sysinst_copy_boot_blocks: Read boot block image.\n");
     
    355355 * @return EOK on success or an error code
    356356 */
    357 static int sysinst_install(const char *dev)
    358 {
    359         int rc;
     357static errno_t sysinst_install(const char *dev)
     358{
     359        errno_t rc;
    360360        char *pdev;
    361361
Note: See TracChangeset for help on using the changeset viewer.