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
This commit is contained in:
@@ -26,12 +26,11 @@ class Partition : public partition_data, public Node {
|
|||||||
Partition *Parent() const { return fParent; }
|
Partition *Parent() const { return fParent; }
|
||||||
bool IsFileSystem() const { return fIsFileSystem; }
|
bool IsFileSystem() const { return fIsFileSystem; }
|
||||||
|
|
||||||
static int32 NextOffset() { return offsetof(Partition, fNext); }
|
static size_t LinkOffset() { return sizeof(partition_data); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void SetParent(Partition *parent) { fParent = parent; }
|
void SetParent(Partition *parent) { fParent = parent; }
|
||||||
|
|
||||||
Partition *fNext;
|
|
||||||
int fFD;
|
int fFD;
|
||||||
list fChildren;
|
list fChildren;
|
||||||
Partition *fParent;
|
Partition *fParent;
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ Partition::Partition(int fd)
|
|||||||
|
|
||||||
// it's safe to close the file
|
// it's safe to close the file
|
||||||
fFD = dup(fd);
|
fFD = dup(fd);
|
||||||
list_init_etc(&fChildren, Partition::NextOffset());
|
list_init_etc(&fChildren, Partition::LinkOffset());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -343,7 +343,7 @@ vfs_init(stage2_args *args)
|
|||||||
status_t
|
status_t
|
||||||
mount_boot_file_systems()
|
mount_boot_file_systems()
|
||||||
{
|
{
|
||||||
list_init_etc(&gPartitions, Partition::NextOffset());
|
list_init_etc(&gPartitions, Partition::LinkOffset());
|
||||||
|
|
||||||
gRoot = new RootFileSystem();
|
gRoot = new RootFileSystem();
|
||||||
if (gRoot == NULL)
|
if (gRoot == NULL)
|
||||||
@@ -362,7 +362,7 @@ mount_boot_file_systems()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (list_is_empty(&gPartitions))
|
if (list_is_empty(&gPartitions))
|
||||||
panic("Could not find any partitions on the boot devices");
|
return B_ENTRY_NOT_FOUND;
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user