system/boot: Finish cleaning up remaining platform_get_boot_partition

* Fixes the riscv64 build
* Should fix next_m68k loader (untested)

Change-Id: Ic9b2d4305302d28a9ca0c71f8e1e502c763162d9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4199
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
This commit is contained in:
Alexander von Gluck IV 2021-07-09 09:07:55 -05:00 committed by Alex von Gluck IV
parent 2123a7ccb4
commit 34fe8ba793
3 changed files with 16 additions and 16 deletions

View File

@ -37,8 +37,8 @@ platform_add_boot_device(struct stage2_args *args, NodeList *devicesList)
status_t
platform_get_boot_partition(struct stage2_args *args, Node *bootDevice,
NodeList *list, boot::Partition **_partition)
platform_get_boot_partitions(struct stage2_args *args, Node *device,
NodeList *list, NodeList *partitionList)
{
return B_ENTRY_NOT_FOUND;
}

View File

@ -182,16 +182,17 @@ platform_add_block_devices(struct stage2_args* args, NodeList* devicesList)
status_t
platform_get_boot_partition(
struct stage2_args* args, Node* bootDevice,
NodeList* partitions, boot::Partition** _partition
)
platform_get_boot_partitions(struct stage2_args* args, Node* bootDevice,
NodeList *list, NodeList *partitionList)
{
// return B_ENTRY_NOT_FOUND;
*_partition = (boot::Partition*)partitions->GetIterator().Next();
dprintf("*_partition: %p\n", *_partition);
return *_partition != NULL ? B_OK : B_ENTRY_NOT_FOUND;
NodeIterator iterator = list->GetIterator();
boot::Partition *partition = NULL;
while ((partition = (boot::Partition *)iterator.Next()) != NULL) {
// ToDo: just take the first partition for now
partitionList->Insert(partition);
return B_OK;
}
return B_ENTRY_NOT_FOUND;
}

View File

@ -154,17 +154,16 @@ platform_add_boot_device(struct stage2_args *args, NodeList *devicesList)
status_t
platform_get_boot_partition(struct stage2_args *args, Node *device,
NodeList *list, boot::Partition **_partition)
platform_get_boot_partitions(struct stage2_args* args, Node* bootDevice,
NodeList *list, NodeList *partitionList)
{
NodeIterator iterator = list->GetIterator();
boot::Partition *partition = NULL;
while ((partition = (boot::Partition *)iterator.Next()) != NULL) {
// just take the first partition
*_partition = partition;
// ToDo: just take the first partition for now
partitionList->Insert(partition);
return B_OK;
}
return B_ENTRY_NOT_FOUND;
}