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
This commit is contained in:
@@ -64,7 +64,7 @@ extern "C" {
|
|||||||
|
|
||||||
status_t vfs_init(struct kernel_args *args);
|
status_t vfs_init(struct kernel_args *args);
|
||||||
status_t vfs_bootstrap_file_systems(void);
|
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_exec_io_context(void *context);
|
||||||
void *vfs_new_io_context(void *parentContext);
|
void *vfs_new_io_context(void *parentContext);
|
||||||
status_t vfs_free_io_context(void *context);
|
status_t vfs_free_io_context(void *context);
|
||||||
|
|||||||
@@ -316,14 +316,16 @@ vfs_bootstrap_file_systems(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
void
|
||||||
vfs_mount_boot_file_system(kernel_args *args)
|
vfs_mount_boot_file_system(kernel_args *args)
|
||||||
{
|
{
|
||||||
PartitionStack partitions;
|
PartitionStack partitions;
|
||||||
status_t status = get_boot_partitions(args, partitions);
|
status_t status = get_boot_partitions(args, partitions);
|
||||||
if (status < B_OK) {
|
if (status < B_OK) {
|
||||||
panic("Did not get any boot partitions!");
|
panic("get_boot_partitions failed!");
|
||||||
return status;
|
}
|
||||||
|
if (partitions.IsEmpty()) {
|
||||||
|
panic("did not find any boot partitions!");
|
||||||
}
|
}
|
||||||
|
|
||||||
KPartition *bootPartition;
|
KPartition *bootPartition;
|
||||||
@@ -332,6 +334,7 @@ vfs_mount_boot_file_system(kernel_args *args)
|
|||||||
if (bootPartition->GetPath(&path) != B_OK)
|
if (bootPartition->GetPath(&path) != B_OK)
|
||||||
panic("could not get boot device!\n");
|
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);
|
gBootDevice = _kern_mount("/boot", path.Path(), NULL, 0, NULL, 0);
|
||||||
if (gBootDevice >= B_OK)
|
if (gBootDevice >= B_OK)
|
||||||
break;
|
break;
|
||||||
@@ -355,7 +358,5 @@ vfs_mount_boot_file_system(kernel_args *args)
|
|||||||
// search for other disk systems
|
// search for other disk systems
|
||||||
KDiskDeviceManager *manager = KDiskDeviceManager::Default();
|
KDiskDeviceManager *manager = KDiskDeviceManager::Default();
|
||||||
manager->RescanDiskSystems();
|
manager->RescanDiskSystems();
|
||||||
|
|
||||||
return B_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user