From c3e36ff4983b6abc397e66ef4a6c8f3b88fe21f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 14 Oct 2003 00:26:04 +0000 Subject: [PATCH] Now uses the DoublyLinked::List class instead of the C list stuff. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5016 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/private/kernel/boot/partitions.h | 6 ++---- headers/private/kernel/boot/platform.h | 6 +++--- headers/private/kernel/boot/vfs.h | 8 ++++++-- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/headers/private/kernel/boot/partitions.h b/headers/private/kernel/boot/partitions.h index 3d0c05a9f7..b70ef47ac1 100644 --- a/headers/private/kernel/boot/partitions.h +++ b/headers/private/kernel/boot/partitions.h @@ -12,7 +12,7 @@ namespace boot { -class Partition : public partition_data, public Node { +class Partition : public Node, public partition_data { public: Partition(int deviceFD); virtual ~Partition(); @@ -31,13 +31,11 @@ class Partition : public partition_data, public Node { Partition *Parent() const { return fParent; } bool IsFileSystem() const { return fIsFileSystem; } - static size_t LinkOffset() { return sizeof(partition_data); } - private: void SetParent(Partition *parent) { fParent = parent; } int fFD; - list fChildren; + NodeList fChildren; Partition *fParent; bool fIsFileSystem; }; diff --git a/headers/private/kernel/boot/platform.h b/headers/private/kernel/boot/platform.h index 7b39f5c46e..bdeac5405f 100644 --- a/headers/private/kernel/boot/platform.h +++ b/headers/private/kernel/boot/platform.h @@ -7,7 +7,7 @@ #include -#include +#include struct stage2_args; @@ -39,8 +39,8 @@ namespace boot { // these functions have to be implemented in C++ extern status_t platform_get_boot_device(struct stage2_args *args, Node **_device); -extern status_t platform_add_block_devices(struct stage2_args *args, struct list *devicesList); -extern status_t platform_get_boot_partition(struct stage2_args *args, struct list *partitions, +extern status_t platform_add_block_devices(struct stage2_args *args, NodeList *devicesList); +extern status_t platform_get_boot_partition(struct stage2_args *args, NodeList *partitions, boot::Partition **_partition); #endif diff --git a/headers/private/kernel/boot/vfs.h b/headers/private/kernel/boot/vfs.h index f278285807..ec85590851 100644 --- a/headers/private/kernel/boot/vfs.h +++ b/headers/private/kernel/boot/vfs.h @@ -8,7 +8,7 @@ #include -#include +#include #include @@ -34,11 +34,15 @@ class Node { status_t Acquire(); status_t Release(); + DoublyLinked::Link fLink; + protected: - list_link fLink; int32 fRefCount; }; +typedef DoublyLinked::List NodeList; +typedef DoublyLinked::Iterator NodeIterator; + class Directory : public Node { public: