User Tools

Site Tools


solaris:devfs_bootdev_get_list.3devinfo

devfs_bootdev_get_list


NAME

devfs_bootdev_get_list -

SYNOPSIS

#include <device_info.h>
int devfs_bootdev_get_list(const char *default_root,
struct boot_dev ***bootdev_list)

PARAMETERS

default_root

String containing the absolute root directory where the dev and devices directories can be found. If NULL, then the root directory is /.

bootdev_list

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,

boot_element

Untranslated attribute value of the boot-dev property entry. For example, disk2.

bootdev_trans

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.

DESCRIPTION

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.

RETURN VALUES

The devfs_bootdev_get_list() function returns the following values:

0

Success.

<0

Attempts to fail the boot device list. Possible causes of failure are:

DEVFS_NOMEM

No memory.

DEVFS_INVAL

Invalid argument.

DEVFS_ERR

diag-switch? or diagnostic-mode? configuration variable is turned on.

DEVFS_ERR

Not root.


solaris/devfs_bootdev_get_list.3devinfo.txt · Last modified: 2023/07/19 08:58 by A User Not Logged in