(C) 1998 AROS - The Amiga Research OS


NAME
#include <libraries/configvars.h>
#include <proto/expansion.h>

BOOL AddBootNode (bootPri , flags , deviceNode , configDev)

LOCATION
In ExpansionBase at offset 6

SYNOPSIS
LONG bootPri
ULONG flags
struct DeviceNode * deviceNode
struct ConfigDev * configDev

FUNCTION
AddBootNode() will add a device into the system. It does this in one of two ways:

1. If DOS is running, add the device to DOS's list of devices immediately. 2. Otherwise, save the information for later use by DOS, possibly as a boot device.

This allows device drivers to add devices into the systems disk device list at any time, without having to worry about whether DOS is available.

If a device is added before DOS is running, then it is possible for the device to be used as a boot device. This allows for the user to choose which device he/she wishes to boot from, and even which OS they may wish to boot from.

The bootstrap will attempt to boot from the highest priority device on the Expansion eb_BootNode list, and if that fails continue through the list until it can succeed.

Floppy disk devices should always be given the highest priority, to allow a user to prevent a hard disk or network boot by inserting a floppy disk.

AddBootNode() will also perform a second bit of magic, that if there is no filesystem specified for this device, (ie dn_SegList, dn_Task and dn_Handler are all NULL), then the standard DOS filesystem will be used for this device.

INPUTS
bootPri
a BYTE describing the boot priority for this disk. Recommended priorities are:

+5 - unit 0 on the floppy disk. The floppy should be the highest priority. 0 - standard hard disk priority -5 - recommended for a network disk -128 - don't bother trying

flags
Additional information:

ADNF_STARTPROC (bit 0)- if set this will cause AddBootNode() to start a filesystem handler for the device node from the information contained in the deviceNode packet. This bit is only useful when there is no running handler for this task (ie dn_Task is NULL).

deviceNode
DOS device node for this device. Typically created my MakeDosNode().

configDev
A valid expansion board ConfigDev structure, this is required for an autoboot before DOS is running.
non
bootable.

RESULT
TRUE if everything was ok, FALSE if for some reason we failed (lack of memory etc).

EXAMPLE

SEE ALSO
AddDosNode()

NOTES
The address of the ConfigDev structure is stored in the ln_Name field of the BootNode structure.

BUGS

INTERNALS

HISTORY