From f5fa54f79828b9fdf292f3c4c67db108e9f1c420 Mon Sep 17 00:00:00 2001 From: Marcus Overhagen Date: Fri, 12 Jan 2007 18:09:15 +0000 Subject: [PATCH] Improved error reporting when a failure to find/mount the root device occurs. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19774 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/private/kernel/vfs.h | 2 +- src/system/kernel/fs/vfs_boot.cpp | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/headers/private/kernel/vfs.h b/headers/private/kernel/vfs.h index 3dbbec26d0..5a3fbfb8ed 100644 --- a/headers/private/kernel/vfs.h +++ b/headers/private/kernel/vfs.h @@ -64,7 +64,7 @@ extern "C" { status_t vfs_init(struct kernel_args *args); status_t vfs_bootstrap_file_systems(void); -status_t vfs_mount_boot_file_system(struct kernel_args *args); +void vfs_mount_boot_file_system(struct kernel_args *args); void vfs_exec_io_context(void *context); void *vfs_new_io_context(void *parentContext); status_t vfs_free_io_context(void *context); diff --git a/src/system/kernel/fs/vfs_boot.cpp b/src/system/kernel/fs/vfs_boot.cpp index 3087027369..2bba442338 100644 --- a/src/system/kernel/fs/vfs_boot.cpp +++ b/src/system/kernel/fs/vfs_boot.cpp @@ -316,14 +316,16 @@ vfs_bootstrap_file_systems(void) } -status_t +void vfs_mount_boot_file_system(kernel_args *args) { PartitionStack partitions; status_t status = get_boot_partitions(args, partitions); if (status < B_OK) { - panic("Did not get any boot partitions!"); - return status; + panic("get_boot_partitions failed!"); + } + if (partitions.IsEmpty()) { + panic("did not find any boot partitions!"); } KPartition *bootPartition; @@ -332,6 +334,7 @@ vfs_mount_boot_file_system(kernel_args *args) if (bootPartition->GetPath(&path) != B_OK) panic("could not get boot device!\n"); + TRACE(("trying to mount boot partition: %s\n", path.Path())); gBootDevice = _kern_mount("/boot", path.Path(), NULL, 0, NULL, 0); if (gBootDevice >= B_OK) break; @@ -355,7 +358,5 @@ vfs_mount_boot_file_system(kernel_args *args) // search for other disk systems KDiskDeviceManager *manager = KDiskDeviceManager::Default(); manager->RescanDiskSystems(); - - return B_OK; }