The boot loader test application now works again (adapted to recent

changes).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5022 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2003-10-14 00:50:17 +00:00
parent 0634bc3221
commit 494601c3fc
3 changed files with 26 additions and 7 deletions
@@ -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);
@@ -15,6 +15,6 @@ heap_init(struct stage2_args *args)
extern "C" void
heap_release(void)
heap_release(struct stage2_args *args)
{
}
@@ -0,0 +1,18 @@
/*
** Copyright 2003, Axel Dörfler, [email protected]. 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 */