Name

Synopsis

Description

The list_devices utility lists the allocatable devices in the system according to specified qualifications.

The device and all device special files associated with the device are listed. The device argument is optional and, if it is not present, all relevant devices are listed. If dev-class is present, devices belonging to the specified dev-class are listed. There is no default dev-class.

Options

The following options are supported:

-l [-cdev-class | device]

Lists the pathnames of the device special files associated with the device that are allocatable to the current process.

If dev-class is specified, lists only the files associated with all devices of the specified device class.

If device is specified, lists only the files associated with the specified device.

-n [-cdev-class | device]

Lists the pathnames of the device special files associated with the device that are allocatable to the current process but are not currently allocated.

If dev-class is specified, lists only the files associated with all devices of the specified device class.

If device is specified, lists only the files associated with the specified device.

-s

Silent. Suppresses any diagnostic output.

-u [-cdev-class | device]

Lists the pathnames of device special files associated with the device that are allocated to the owner of the current process.

If dev-class is specified, lists only the files associated with all devices of the specified device class.

If device is specified, lists only the files associated with the specified device.

-Uuid

Uses the user ID uid instead of the real user ID of the current process when performing the list_devices operation. Only a user with the solaris.device.revoke authorization can
use this option.

The following options are supported when the system is configured with Trusted Extensions:

-a

Lists attributes like authorizations, cleaning programs and labels associated with a device.

The list is a single line of semicolon (;) separated key=value pairs for each device in the format:

Displays the system-supplied default attributes for the device types managed by device allocation. If dev-type is specified, it lists the default attributes for only that device type.

-w

This option can be used with -a to list the current owner of the device as the key value pair owner=value. value is the uid of the current owner
of the device. If the device is unallocated, value is /FREE. If the device is in error state, value is /ERROR. This option also suppresses any diagnostic output.

-zzonename

When specified with the -l option, lists only those non-allocated devices whose label range includes the label of the zonename, and of the allocated devices, only those that are allocated at the same label as that of zonename.

When specified with the -n option, lists only those non-allocated devices whose label range includes the label of the zonename.

When specified with the -u option, lists only those devices that are allocated at the same label as that of zonename.

Examples

Example 1 Listing All Devices

The following example lists all devices available to the caller for allocation: