User Tools

Site Tools




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:

1.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.
2.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:

1.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.

2.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.

3.Prom Path Match

Uses the absolute prom path name, with defaults expanded.

Note -

Selecting by collation order, we keep the function’s action in line with the devfs_get_prom_names() interface.

The level of resolution may be restricted by setting the appropriate values in the options_flag.

Note -

Restrictions: SPARC only.


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.

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