diff --git a/src/tests/kernel/boot/loader/platform_devices.cpp b/src/tests/kernel/boot/loader/platform_devices.cpp index 3588241440..e0b410a0fd 100644 --- a/src/tests/kernel/boot/loader/platform_devices.cpp +++ b/src/tests/kernel/boot/loader/platform_devices.cpp @@ -35,7 +35,7 @@ get_device(const char *path, Node **_device) static status_t -add_device(const char *path, struct list *list) +add_device(const char *path, NodeList *list) { Node *device; status_t status = get_device(path, &device); @@ -43,14 +43,14 @@ add_device(const char *path, struct list *list) return status; printf("add \"%s\" to list of boot devices\n", path); - list_add_item(list, device); + list->Add(device); return B_OK; } static status_t -recursive_add_device(const char *path, struct list *list) +recursive_add_device(const char *path, NodeList *list) { DIR *dir = opendir(path); if (dir == NULL) @@ -91,11 +91,12 @@ platform_get_boot_device(struct stage2_args *args, Node **_device) status_t -platform_get_boot_partition(struct stage2_args *args, struct list *list, +platform_get_boot_partition(struct stage2_args *args, NodeList *list, boot::Partition **_partition) { + NodeIterator iterator = list->Iterator(); boot::Partition *partition = NULL; - while ((partition = (boot::Partition *)list_get_next_item(list, partition)) != NULL) { + while ((partition = (boot::Partition *)iterator.Next()) != NULL) { // just take the first partition *_partition = partition; return B_OK; @@ -106,7 +107,7 @@ platform_get_boot_partition(struct stage2_args *args, struct list *list, status_t -platform_add_block_devices(struct stage2_args *args, struct list *list) +platform_add_block_devices(struct stage2_args *args, NodeList *list) { recursive_add_device("/dev/disk/ide", list); recursive_add_device("/dev/disk/scsi", list); diff --git a/src/tests/kernel/boot/loader/platform_heap.cpp b/src/tests/kernel/boot/loader/platform_heap.cpp index 9d84935d8f..8a84868dab 100644 --- a/src/tests/kernel/boot/loader/platform_heap.cpp +++ b/src/tests/kernel/boot/loader/platform_heap.cpp @@ -15,6 +15,6 @@ heap_init(struct stage2_args *args) extern "C" void -heap_release(void) +heap_release(struct stage2_args *args) { } diff --git a/src/tests/kernel/boot/loader/platform_kernel_args.h b/src/tests/kernel/boot/loader/platform_kernel_args.h new file mode 100644 index 0000000000..6e2e141e31 --- /dev/null +++ b/src/tests/kernel/boot/loader/platform_kernel_args.h @@ -0,0 +1,18 @@ +/* +** Copyright 2003, Axel Dörfler, axeld@pinc-software.de. All rights reserved. +** Distributed under the terms of the OpenBeOS License. +*/ +#ifndef PLATFORM_KERNEL_ARGS_H +#define PLATFORM_KERNEL_ARGS_H + +// must match SMP_MAX_CPUS in arch_smp.h +#define MAX_BOOT_CPUS 4 +#define MAX_PHYSICAL_MEMORY_RANGE 4 +#define MAX_PHYSICAL_ALLOCATED_RANGE 4 +#define MAX_VIRTUAL_ALLOCATED_RANGE 4 + +struct platform_kernel_args { + /* they are just empty! */ +}; + +#endif /* PLATFORM_KERNEL_ARGS_H */