From 7f794322031ca434ae0f2290f1ed203169bf50a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Thu, 6 May 2004 01:25:36 +0000 Subject: [PATCH] Separated the bootstrapping of the standard file systems from the boot file system - it's now mounted a bit later. Renamed vfs_register_filesystem() to vfs_register_file_system(). Changed return codes to status_t where appropriate. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7424 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/core/fs/vfs.cpp | 40 ++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/src/kernel/core/fs/vfs.cpp b/src/kernel/core/fs/vfs.cpp index a3c194b739..9fea65cd9f 100755 --- a/src/kernel/core/fs/vfs.cpp +++ b/src/kernel/core/fs/vfs.cpp @@ -5,9 +5,7 @@ /* ** Copyright 2002-2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved. ** Distributed under the terms of the OpenBeOS License. -*/ - -/* +** ** Copyright 2001-2002, Travis Geiselbrecht. All rights reserved. ** Distributed under the terms of the NewOS License. */ @@ -1818,8 +1816,8 @@ vfs_test(void) #endif -int -vfs_bootstrap_all_filesystems(void) +status_t +vfs_bootstrap_file_systems(void) { status_t status; @@ -1832,15 +1830,6 @@ vfs_bootstrap_all_filesystems(void) sys_setcwd(-1, "/"); - // bootstrap the bootfs - bootstrap_bootfs(); - - sys_create_dir("/boot", 0755); - dev_t bootDevice = sNextMountID; - status = sys_mount("/boot", NULL, "bootfs", NULL); - if (status < B_OK) - panic("error mounting bootfs\n"); - // bootstrap the devfs bootstrap_devfs(); @@ -1864,6 +1853,23 @@ vfs_bootstrap_all_filesystems(void) // we don't care if it will succeed or not } + return B_OK; +} + + +status_t +vfs_mount_boot_file_system() +{ + // bootstrap the bootfs + + bootstrap_bootfs(); + + sys_create_dir("/boot", 0755); + dev_t bootDevice = sNextMountID; + status_t status = sys_mount("/boot", NULL, "bootfs", NULL); + if (status < B_OK) + panic("error mounting bootfs\n"); + // create link for the name of the boot device fs_info info; @@ -1878,8 +1884,8 @@ vfs_bootstrap_all_filesystems(void) } -int -vfs_register_filesystem(const char *name, struct fs_ops *ops) +status_t +vfs_register_file_system(const char *name, struct fs_ops *ops) { status_t status = B_OK; file_system *fs; @@ -1898,7 +1904,7 @@ vfs_register_filesystem(const char *name, struct fs_ops *ops) } -int +status_t vfs_init(kernel_args *ka) { {