From 9225f27c044b02e5bbe643c54aa6e44f93539bcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Thu, 11 Sep 2003 18:58:05 +0000 Subject: [PATCH] Class Node already had a list_link field, so Partition::fNext was not only wrong, but also completely senseless :-) Renamed Partition::NextOffset() to LinkOffset() to honour that change. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4623 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/boot/loader/Partition.h | 3 +-- src/kernel/boot/loader/partitions.cpp | 2 +- src/kernel/boot/loader/vfs.cpp | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/kernel/boot/loader/Partition.h b/src/kernel/boot/loader/Partition.h index 2f6399d11f..8545cf6a24 100644 --- a/src/kernel/boot/loader/Partition.h +++ b/src/kernel/boot/loader/Partition.h @@ -26,12 +26,11 @@ class Partition : public partition_data, public Node { Partition *Parent() const { return fParent; } bool IsFileSystem() const { return fIsFileSystem; } - static int32 NextOffset() { return offsetof(Partition, fNext); } + static size_t LinkOffset() { return sizeof(partition_data); } private: void SetParent(Partition *parent) { fParent = parent; } - Partition *fNext; int fFD; list fChildren; Partition *fParent; diff --git a/src/kernel/boot/loader/partitions.cpp b/src/kernel/boot/loader/partitions.cpp index ae1c9d68f1..b926599156 100644 --- a/src/kernel/boot/loader/partitions.cpp +++ b/src/kernel/boot/loader/partitions.cpp @@ -60,7 +60,7 @@ Partition::Partition(int fd) // it's safe to close the file fFD = dup(fd); - list_init_etc(&fChildren, Partition::NextOffset()); + list_init_etc(&fChildren, Partition::LinkOffset()); } diff --git a/src/kernel/boot/loader/vfs.cpp b/src/kernel/boot/loader/vfs.cpp index 7e3e4a6941..c29161396f 100644 --- a/src/kernel/boot/loader/vfs.cpp +++ b/src/kernel/boot/loader/vfs.cpp @@ -343,7 +343,7 @@ vfs_init(stage2_args *args) status_t mount_boot_file_systems() { - list_init_etc(&gPartitions, Partition::NextOffset()); + list_init_etc(&gPartitions, Partition::LinkOffset()); gRoot = new RootFileSystem(); if (gRoot == NULL) @@ -362,7 +362,7 @@ mount_boot_file_systems() } if (list_is_empty(&gPartitions)) - panic("Could not find any partitions on the boot devices"); + return B_ENTRY_NOT_FOUND; return B_OK; }