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 status_t
platform_get_boot_partition(struct stage2_args *args, Node *bootDevice, platform_get_boot_partitions(struct stage2_args *args, Node *device,
NodeList *list, boot::Partition **_partition) NodeList *list, NodeList *partitionList)
{ {
return B_ENTRY_NOT_FOUND; return B_ENTRY_NOT_FOUND;
} }

View File

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