Go to main content

man pages section 3: Extended Library Functions, Volume 1

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

devfs_get_prom_names (3DEVINFO)

Name

devfs_get_prom_names -

Synopsis

#include <device_info.h>
	int devfs_get_prom_names(const char *dev_name,
	uint_t options, char ***prom_list)

Parameters

dev_name

Non-NULL string representing the absolute path name for a logical device under /dev.

options

A bit flag indicating how the types of matches returned should be restricted. Valid values are:

  • BOOTDEV_NO_PROM_PATH

  • BOOTDEV_NO_INEXACT_ALIAS

  • BOOTDEV_NO_EXACT_ALIAS

prom_list

Address for a string pointer array used to retrieve the dynamically allocated list prom names.

Description

Retrieves all prom representations associated with a given logical device, /dev. The returned lists are collated using the following criteria:

  1. Exact Alias Matches

    Aliases whose prom path names are identical to the prom name associated with the device.

  2. Inexact Alias Matches

    Aliases whose prom path name matches the prom path name associated with the device, with the exception of minor device override specifier.

  3. Prom Path Name

    The absolute prom path name associated with the device.

The user can restrict these three entry types with function parameters. If there are no matches, a NULL list is returned. The string array and all string fields are dynamically allocated by this function, and must be freed by the caller. Each group of aliases, exact and inexact, is sorted in collation order.


Note -  Restrictions: SPARC and x86 only.

Return Values

The devfs_get_prom_names() function returns the following values:

0

Operation successful.

<0

Operation failed.

DEVFS_NOMEM

No memory.

DEVFS_INVAL

Invalid argument.

DEVFS_PERM

Not root.

DEVFS_NOTSUP

Operation not supported.