mksf.1m (2012 03)

m
mksf(1M) mksf(1M)
NAME
mksf - make a special (device) file
SYNOPSIS
/sbin/mksf {(-C class -d
driver ) -I instance -H hw_path }[-D directory ][
-q-v]
[driver-options ][special-file]
/sbin/mksf {(-C class -d
driver ) -I instance -H hw_path }[-D directory ][
-q-v][-r]
-m minor special-file
DESCRIPTION
The mksf command makes a special file in the devices directory, normally
/dev, for an existing device, a
device that has already been assigned an instance number by the system. The device is specified by sup-
plying some combination of the
-C
, -d, -H and -I options. If the options specified match a unique device
in the system,
mksf creates a special file for that device; otherwise,
mksf prints an error message and
exits. If required,
mksf creates any subdirectories relative to the device installation directory that are
defined for the resulting special file.
For most drivers,
mksf has a set of built-in driver options, driver-options , and special file naming con-
ventions. By supplying some subset of the driver options, as in the first form above, the user can create a
special file with a particular set of characteristics. If a special-file name is specified,
mksf creates the
special file with that special file name; otherwise, the default naming convention for the driver is used.
In the second form, the minor number and special-file name are explicitly specified. When
-D is not
used, the special file must be specified with the absolute path. In this case, if any other path other than
the absolute path is specified, the path is treated relative to the default devices directory. This form is
used to make a special file for a driver without using the built-in driver options in
mksf. The -r option
specifies that
mksf should make a character (raw) device file instead of the default block device file for
drivers that support both.
Options
mksf recognizes the following options:
-C class Match a device that belongs to a given device class, class . Device classes can be
listed with the lsdev command (see lsdev (1M)). This option is not valid for pseudo
devices. This option cannot be used with -d.
-d driver Match a device that is controlled by the specified device driver, driver .Device
drivers can be listed with the
lsdev command (see lsdev (1M)). This option cannot
be used with -C.
-D directory Override the default device installation directory /dev and install the special files
in directory instead. directory must exist; otherwise, mksf displays an error mes-
sage and exits. See WARNINGS .
-H hw_path Match a device at a given hardware path, hw-path . Hardware paths can be listed
with the ioscan command (see ioscan (1M)). A hardware path specifies the
addresses of the hardware components leading to a device. It consists of a string of
numbers separated by periods (.), such as 52 (a card), 52.3 (a target address),
and 52.3.0 (a device). If a hardware component is a bus converter, the following
period, if any, is replaced by a slash (/)asin2, 2/3, and 2/3.0. This option is
not valid for pseudo devices.
-I instance Match a device with the specified instance number. Instances can be listed with the
-f option of the ioscan command (see ioscan (1M)). This option is not valid for
pseudo devices. This option must be used with the -d or -C option.
-m minor Create the special file with the specified minor number minor . The format of minor
is the same as that given in mknod(1M) and mknod(5). This option cannot be used
to create persistent special files.
-q Quiet option. Normally, mksf displays a message as each driver is processed. This
option suppresses the driver message, but not error messages. See the -v option.
-r Create a character (raw) special file instead of a block special file.
-v Verbose option. In addition to the normal processing message, display the name of
each special file as it is created. See the -q option.
HP-UX 11i Version 3: March 2012 1 Hewlett-Packard Company 1

Summary of content (10 pages)