add_allocatable creates or updates database entries for allocatable devices and certain non-allocatable devices. add_allocatable updates the device_allocate(4) and device_maps(4) databases. The database entries are needed when devices are user-allocatable. The database entries are also needed for the frame buffer and printers because the label ranges for these non-allocatable devices are managed by the device allocation mechanism.
add_allocatable can be used in shell scripts, such as installation scripts for driver packages, to automate the administrative work of setting up a new device.
See attributes(5) for descriptions of the following attributes:
Force an update of an already-existing entry with the specified information. add_allocatable exits with an error if this option is not specified when an entry with the specified device name already exists.
Turn on silent mode. add_allocatable does not print any error or warning messages.
Puts a device name name into the device-name fields of the device's entries in device_allocate and device_maps.
Puts a device type type into the device-type fields of the device's entries in device_allocate and device_maps.
Puts the device special file names specified in device-list into the device-list field of the device's entry in device_maps. The list of devices must be separated by white space, and the list must be quoted because white spaces are treated by the shell as argument delimiters.
Puts the minimum sensitivity label minSL of the device into the dev-minimum field of the device's entry in device_allocate. The default sensitivity label
ADMIN_LOW is used when this optional argument is not specified.
Puts the maximum sensitivity label maxSL into the dev-maximum field of the device's entry in device_allocate. The default sensitivity label
ADMIN_HIGH is used when this optional argument is not specified.
Puts one or more authorizations or other characters specified in authorization into the device authorization field of the device's entry in device_allocate. When more than one authorization is specified, the list must be separated by commas and must be quoted. When the device is not allocatable, authorization is specified with an asterisk (*) and must be quoted. When the device is allocatable and is allocatable by any user, authorization is specified with the at sign (@) and must be quoted. When this optional argument is not specified, the default value '@' is used, and the device is allocatable by any user with no authorization required.
Accepts a string of colon-separated key=value pairs for incorporation into device_allocate(4).
When successful, add_allocate returns an exit status of 0 (true). add_allocate returns a nonzero exit status in the event of an error. The exit codes are as follows:
Invocation syntax error
Unknown system error
A device_allocate entry already exists. This error occurs only when the -f option is not specified.
Permission denied. User does not have DAC or MAC access to database.
Mandatory access control file for devices
List of physical devices associated with a device name and type