Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ add_drv(1M) — SunOS 5.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

devlinks(1M)

disks(1M)

drvconfig(1M)

modinfo(1M)

ports(1M)

rem_drv(1M)

tapes(1M)

driver.conf(4)

system(4)

ddi_create_minor_node(9F)

add_drv(1M)

NAME

add_drv − add a new device driver to the system

SYNOPSIS

add_drv [ −b basedir ] [ −i ’identify_name...’ ] [ −m ’permission’,’...’ ]

driver_module

AVAILABILITY

SUNWcsu

DESCRIPTION

The add_drv command is used to inform the system about newly installed device drivers. 

OPTIONS

−b basedir Sets the path to the root directory of the diskless client.  Used on the server to add_drv for a diskless client.  The client machine must be rebooted to install the driver. 

−i ’identify_name’ A whitespace separated list of aliases for the driver driver_module.

−m ’permission’ Specify the file system permissions for device nodes created by the system on behalf of driver_module.

EXAMPLES

The following example adds the SUNW,example driver to the system, with an alias name of SUNW,alias.  It assumes the driver has already been copied to /usr/kernel/drv. 

example# add_drv −m ’∗ 0666 bin bin’,’a 0644 root sys’ \
−i ’SUNW,alias’ SUNW,example

Every minor node created by the system for the SUNW,example driver will have the permission 0666, and be owned by user bin in the group bin, except for the minor device a, which will be owned by root, group sys, and have a permission of 0644. 

The following example adds the driver to the client /export/root/sun1.  The driver is installed and loaded when the client machine, sun1, is rebooted. 

example# add_drv −m ’∗ 0666 bin bin’,’a 0644 root sys’ \
−i ’SUNW,alias’ -b /export/root/sun1 \
SUNW,example

This second example produces the same result as the first, except the changes are on the diskless client, sun1, and the client must be rebooted for the driver to be installed. 

EXIT CODES

add_drv returns 0 if successful, 1 if a failure occurred. 

FILES

/kernel/drv boot device drivers, platform-dependent drivers. 

/usr/kernel/drv other drivers that could potentially be shared between platforms. 

/etc/driver_aliases driver aliases file. 

/etc/minor_perm minor node permissions. 

/etc/name_to_major
major number binding.

SEE ALSO

devlinks(1M), disks(1M), drvconfig(1M), modinfo(1M), ports(1M), rem_drv(1M), tapes(1M), driver.conf(4), system(4), ddi_create_minor_node(9F)

SunOS 5.3 Writing Device Drivers

NOTES

Aliases may require quoting (with double-quotes) if they contain numbers. 

Sun Microsystems  —  Last change: 28 June 1993

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026