devfs_bootdev_set_list -
#include <device_info.h> int devfs_bootdev_set_list(const char *dev_name, const uint_t options)
Non-NULL string containing the absolute path name for a logical device, /dev. If BOOTDEV_LITERAL is specified in option, this parameter must contain a prom device name or alias.
Flag indicating modifications to the default behavior of devfs_bootdev_set_list(). If options is 0, the default behavior is assumed.
Default behavior is to prepend the boot-device entry and to use the most compact representation of the device name possible, that is, resolve to an alias if possible. Flag values are set by performing the "or" operation on the appropriate flag values. Valid values are:
Disables automatic aliasing and uses device_name value explicitly
Translates device_name to the equivalent prom device path name
Overwrites the existing entries with the new entries
Modifies the default boot device list in the corresponding system boot firmware on OBP systems, when possible.
The supported modifications are:
Prepends the entry. Inserts an entry at the head of the boot-device list. If the device being prepended resolves to the same prom path as another entry in the list, the existing entry is removed from its current location before the prepend operation is executed. In this case, the prepend action implements an entry relocation. This is the default behavior.
Overwrites the list with a single entry. Removes all existing boot device values, and then prepends the entry to the head of the now-empty list. For more information, see BOOTDEV_OVERWRITE.
The function attempts to resolve device_name to a prom name in the following manner, in order of preference:
Exact Alias match
Finds an alias which is an exact match to the prom path name, with defaults expanded. If there are multiple entries, the first alias found in collation order is used.
Inexact Alias match
If an alias matches all but the minor device specifier, then that alias is used with the :specifier override. If there are multiple entries, the first alias found in collation order is used.
Prom Path Match
Uses the absolute prom path name, with defaults expanded.
The level of resolution may be restricted by setting the appropriate values in the options_flag.
The devfs_bootdev_set_list() function returns the following values:
Device specified successfully is set as the default boot device.
Attempt to set default boot device failed. Possible causes of failure are:
No memory.
Invalid argument.
diag-switch? or diagonistic-mode? configuration variable is turned on.
Not root
Operation not supported.