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:
parent
9a7a3f03c1
commit
9225f27c04
@ -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;
|
||||
|
@ -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());
|
||||
}
|
||||
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user