Changeset 368ee04 in mainline for uspace/app/init/init.c


Ignore:
Timestamp:
2017-04-05T18:10:39Z (8 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
93ad8166
Parents:
39f892a9 (diff), 2166728 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge from lp:~jakub/helenos/vfs-2.5-cherrypick

This merge cherry-picks some of the changesets from Jiri Zarevucky's:

lp:~zarevucky-jiri/helenos/vfs-2.5

and then continues independently, yet sometime in a similar vein.

Roughly speaking, Jiri's branch is merged entirely up to its revision
1926 and then cherry-picked on and off until its revision 1965. Among
these changes are:

  • relativization of the API,
  • client-side roots,
  • server-side mounts,
  • inbox for passing arbitrary files from parent to child,
  • some streamlining and cleanup.

Additional changes include:

  • addressing issues introduced by the above changes,
  • client-side I/O cursors (file positions),
  • all HelenOS file system APIs begin with the vfs_ prefix and can be used after including vfs/vfs.h,
  • removal of some POSIX-ish headers and definitions,
  • additional cleanup.
File:
1 edited

Legend:

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

    r39f892a9 r368ee04  
    4141#include <stdbool.h>
    4242#include <errno.h>
    43 #include <fcntl.h>
    44 #include <sys/stat.h>
    4543#include <task.h>
    4644#include <malloc.h>
     
    5048#include <str_error.h>
    5149#include <config.h>
     50#include <io/logctl.h>
    5251#include "init.h"
    5352
     
    127126                opts = "restore";
    128127       
    129         int rc = vfs_mount(fstype, ROOT_MOUNT_POINT, ROOT_DEVICE, opts,
     128        int rc = vfs_mount_path(ROOT_MOUNT_POINT, fstype, ROOT_DEVICE, opts,
    130129            IPC_FLAG_BLOCKING, 0);
     130        if (rc == EOK)
     131                logctl_set_root();
    131132        return mount_report("Root filesystem", ROOT_MOUNT_POINT, fstype,
    132133            ROOT_DEVICE, rc);
     
    144145static bool mount_locfs(void)
    145146{
    146         int rc = vfs_mount(LOCFS_FS_TYPE, LOCFS_MOUNT_POINT, "", "",
     147        int rc = vfs_mount_path(LOCFS_MOUNT_POINT, LOCFS_FS_TYPE, "", "",
    147148            IPC_FLAG_BLOCKING, 0);
    148149        return mount_report("Location service filesystem", LOCFS_MOUNT_POINT,
     
    153154{
    154155        struct stat s;
    155         if (stat(path, &s) != 0) {
     156        if (vfs_stat_path(path, &s) != EOK) {
    156157                printf("%s: Unable to stat %s\n", NAME, path);
    157158                return ENOENT;
     
    300301static bool mount_tmpfs(void)
    301302{
    302         int rc = vfs_mount(TMPFS_FS_TYPE, TMPFS_MOUNT_POINT, "", "", 0, 0);
     303        int rc = vfs_mount_path(TMPFS_MOUNT_POINT, TMPFS_FS_TYPE, "", "", 0, 0);
    303304        return mount_report("Temporary filesystem", TMPFS_MOUNT_POINT,
    304305            TMPFS_FS_TYPE, NULL, rc);
Note: See TracChangeset for help on using the changeset viewer.