devfs_bootdev_get_list -
#include <device_info.h> int devfs_bootdev_get_list(const char *default_root, struct boot_dev ***bootdev_list)
String containing the absolute root directory where the dev and devices directories can be found. If NULL, then the root directory is /.
NULL terminated array of pointers to the boot_dev data structures. Each entry corresponds positionally to an entry in the boot-device list. The boot_dev array is allocated by the library function and must be free by the caller using the devfs_bootdev_free_list() function.
The boot_dev structure contains two parameters. They are: char *bootdev_element and char **bootdev_trans where,
Untranslated attribute value of the boot-dev property entry. For example, disk2.
NULL terminated array of strings where each string is a logical device name, /dev, that is found to reference the device specified by the given boot device entry. Only a /dev which can be fully resolved is returned. If the boot-dev property does not specifically reference a minor device, but is a valid device, the default option, minor name, is applied before resolving to a /dev name.
The devfs_bootdev_get_list() function retrieves the list of boot device values used to locate the primary boot blocks. On OBP SPARC systems, the untranslated entries of the boot-dev property are returned. On Intel systems, the list of BIOS primary boot devices is returned. For each boot device entry, a list of all resolvable /dev device translations are returned.
The devfs_bootdev_get_list() function returns the following values:
Success.
Attempts to fail the boot device list. Possible causes of failure are:
No memory.
Invalid argument.
diag-switch? or diagnostic-mode? configuration variable is turned on.
Not root.