2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
5 GetBootInfo() function.
8 #include <aros/debug.h>
9 #include <aros/bootloader.h>
11 #include "bootloader_intern.h"
13 /*****************************************************************************
16 #include <proto/bootloader.h>
18 AROS_LH1(APTR
, GetBootInfo
,
21 AROS_LHA(ULONG
, infoType
, D0
),
24 struct BootLoaderBase
*, BootLoaderBase
, 1, Bootloader
)
27 Return information from the bootloader
30 infoType - The type of information requested. Valid types are:
31 BL_Video (struct VesaInfo*) - VESA video mode data
32 BL_LoaderName (STRPTR) - Name of bootloader
33 BL_Args (struct List *) - Kernel arguments. Data item is struct Node.
34 ln_Name points to argument text.
35 BL_Drives (struct List *) - Legacy disk drives present in the system.
36 Data item is struct DriveInfoNode.
39 Pointer to data or NULL if not supplied
51 *****************************************************************************/
55 D(bug("[BootLdr] GetBootInfo(%u)\n", infoType
));
59 return BootLoaderBase
->LdrName
;
62 if (BootLoaderBase
->Flags
& BL_FLAGS_CMDLINE
)
63 return &(BootLoaderBase
->Args
);
67 return BootLoaderBase
->Vesa
;
70 if (BootLoaderBase
->Flags
& BL_FLAGS_DRIVES
)
71 return (APTR
)&(BootLoaderBase
->DriveInfo
);
75 D(bug("[BootLdr] GetBootInfo: Unknown info requested\n"));