Changeset 6afc9d7 in mainline for uspace/app/init/init.c


Ignore:
Timestamp:
2015-10-06T19:01:36Z (10 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0328987
Parents:
f1f7584
Message:

UNIX-like I/O functions should use errno to return error code for many reasons.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/init/init.c

    rf1f7584 r6afc9d7  
    126126                opts = "restore";
    127127       
    128         int rc = mount(fstype, ROOT_MOUNT_POINT, ROOT_DEVICE, opts,
     128        int rc = vfs_mount(fstype, ROOT_MOUNT_POINT, ROOT_DEVICE, opts,
    129129            IPC_FLAG_BLOCKING, 0);
    130130        return mount_report("Root filesystem", ROOT_MOUNT_POINT, fstype,
     
    143143static bool mount_locfs(void)
    144144{
    145         int rc = mount(LOCFS_FS_TYPE, LOCFS_MOUNT_POINT, "", "",
     145        int rc = vfs_mount(LOCFS_FS_TYPE, LOCFS_MOUNT_POINT, "", "",
    146146            IPC_FLAG_BLOCKING, 0);
    147147        return mount_report("Location service filesystem", LOCFS_MOUNT_POINT,
     
    152152{
    153153        struct stat s;
    154         if (stat(path, &s) == ENOENT) {
     154        if (stat(path, &s) != 0) {
    155155                printf("%s: Unable to stat %s\n", NAME, path);
    156156                return ENOENT;
     
    299299static bool mount_tmpfs(void)
    300300{
    301         int rc = mount(TMPFS_FS_TYPE, TMPFS_MOUNT_POINT, "", "", 0, 0);
     301        int rc = vfs_mount(TMPFS_FS_TYPE, TMPFS_MOUNT_POINT, "", "", 0, 0);
    302302        return mount_report("Temporary filesystem", TMPFS_MOUNT_POINT,
    303303            TMPFS_FS_TYPE, NULL, rc);
Note: See TracChangeset for help on using the changeset viewer.