mksf(1M) mksf(1M)
NAME [Toc] [Back]
mksf - make a special (device) file
SYNOPSIS [Toc] [Back]
/sbin/mksf [-C class | -d driver] [-D directory] [-H hw-path]
[-I instance] [-q|-v] [driver-options] [special-file]
/sbin/mksf [-C class | -d driver] [-D directory] [-H hw-path]
-m minor [-q|-v] [-r] special-file
DESCRIPTION [Toc] [Back]
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
supplying 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 conventions. 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. 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 [Toc] [Back]
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)). They are
defined in the files in the directory
/usr/conf/master.d. 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)).
They are defined in the files in the directory
Hewlett-Packard Company - 1 - HP-UX 11i Version 2: August 2003
mksf(1M) mksf(1M)
/usr/conf/master.d. 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 message 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 (/) as in 2, 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.
-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).
-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.
Naming Conventions [Toc] [Back]
Many special files are named using the ccardttargetddevice naming
convention. These variables have the following meaning wherever they
are used.
card The unique interface card identification number from
ioscan (see ioscan(1M)). It is represented as a
decimal number with a typical range of 0 to 255.
Hewlett-Packard Company - 2 - HP-UX 11i Version 2: August 2003
mksf(1M) mksf(1M)
target The device target number, for example the address on a
HP-FL or SCSI bus. It is represented as a decimal
number with a typical range of 0 to 15.
device A address unit within a device, for example, the unit
in a HP-FL device or the LUN in a SCSI device. It is
represented as a decimal number with a typical range of
0 to 15.
Special Files [Toc] [Back]
The driver-specific options (driver-options) and default special file
names (special-file) are listed below.
asio0
-a access-mode Port access mode (0-2). The default access mode
is 0 (Direct connect). The access-mode meanings
are:
______________________________
|access-mode | Port Operation |
|____________|________________|
| 0 | Direct connect |
| 1 | Dial out modem |
| 2 | Dial in modem |
|____________|________________|
-c CCITT.
-f Hardware flow control (RTS/CTS).
-i Modem dialer. Cannot be used with -l.
-l Line printer. Cannot be used with -i.
-p port Multiplexer port number (0 for built-in serial
port; 0-1 for SAS console ports). The default
port number is 0.
-r fifo-trigger
fifo-trigger should have a value between 0 and 3.
The following table shows the corresponding FIFO
trigger level for a given fifo-trigger value.
Hewlett-Packard Company - 3 - HP-UX 11i Version 2: August 2003
mksf(1M) mksf(1M)
___________________________________________
|fifo-trigger | Receive FIFO Trigger Level |
|_____________|____________________________|
| 0 | 1 |
| 1 | 4 |
| 2 | 8 |
| 3 | 14 |
|_____________|____________________________|
-t Transparent mode (normally used by diagnostics).
-x xmit-limit xmit-limit should have a value between 0 and 3.
The following table shows the corresponding
transmit limit for a given xmit-limit value.
_____________________________
|xmit-limit | Transmit Limit |
|___________|________________|
| 0 | 1 |
| 1 | 4 |
| 2 | 8 |
| 3 | 12 |
|___________|________________|
special-file The default special file name depends on the
access-mode and whether the -i and -l options are
used.
_____________________________________________
|access-mode | -i | -l | Special File Name |
|____________|_____|_____|___________________|
| - | no | yes | ccardp0_lp |
| 2 | no | no | ttydcardp0 |
| 1 | no | no | culcardp0 |
| 0 | yes | no | cuacardp0 |
| 0 | no | no | ttycardp0 |
|____________|_____|_____|___________________|
audio
-f format Audio format (0-3). The format meanings are:
_________________________________________________________
| | | File Name Modifier |
|format | Audio Format | format-mod |
|_______|___________________________|____________________|
| 0 | No change in audio format | |
| 1 | 8-bit Mu-law | U |
| 2 | 8-bit A-law | A |
| 3 | 16-bit linear | L |
|_______|___________________________|____________________|
Hewlett-Packard Company - 4 - HP-UX 11i Version 2: August 2003
mksf(1M) mksf(1M)
-o output-dest Output destination (0-4). The output-dest should
have a value between 0 and 4. The following table
shows the corresponding output destinations for a
given output-dest value.
________________________________________________________
| | | File Name Modifier |
|output-dest | Output Destinations | output-mod |
|____________|_____________________|____________________|
| 0 | All outputs | B |
| 1 | Headphone | E |
| 2 | Internal Speaker | I |
| 3 | No output | N |
| 4 | Line output | L |
|____________|_____________________|____________________|
-r Raw, control access. This option cannot be used
with either the -f or -o options.
special-file The default special file name depends on the
options specified.
_____________________________________________
| Options | Special File Name |
|___________|________________________________|
| -r | audioCtl_card |
| -f 0 | audio_card |
|all others | audiooutput-modformat-mod_card |
|___________|________________________________|
The optional output-mod and format-mod values are
given in the tables above. Note the underscore
(_) before card in each special file name. Also
note that for card 0, each file will be linked to
a simpler name without the trailing _card.
autox0 schgr
Note that -i cannot be used with either -r or -p.
-i Ioctl; create picker control special file.
-p optical-disk[:last-optical-disk]
The optical disk number (starts with 1). If the
optional :last-optical-disk is given then special
files for the range of disks specified will be
created.
-r Raw; create character, not block, special file.
special-file A special file cannot be given if a range of
optical disks is given with the -p option. If one
Hewlett-Packard Company - 5 - HP-UX 11i Version 2: August 2003
mksf(1M) mksf(1M)
is given for the single disk case, the name will
have an a appended to the end for the A-side
device and a b appended to the end for the B-side
device. The default special file name depends on
whether the -r option is used.
_____________________________________________
|-r | Special File Name |
|____|_______________________________________|
|yes | rac/ccardttargetddevice_optical-diska |
| | rac/ccardttargetddevice_optical-diskb |
|____|_______________________________________|
|no | ac/ccardttargetddevice_optical-diska |
| | ac/ccardttargetddevice_optical-diskb |
|____|_______________________________________|
Note the underscore (_) between device and
optical-disk.
CentIf [Toc] [Back]
-h handshake-mode
Handshake mode. Valid values range from 1 to 6:
_____________________________________________________________
|handshake-mode | Handshake operation |
|_______________|____________________________________________|
| 1 | Automatic NACK/BUSY handshaking |
| 2 | Automatic BUSY only handshaking |
| 3 | Bidirectional read/write |
| 4 | Stream mode (NSTROBE only, no handshaking) |
| 5 | Automatic NACK/BUSY with pulsed NSTROBE |
| 6 | Automatic BUSY with pulsed NSTROBE |
|_______________|____________________________________________|
special-file The default special file name is ccardt0d0_lp for
handshake-mode 2 and ccardt0d0hhandshake-mode_lp
for all others. For SCentIf, the only valid
handshake value is 2 (Automatic BUSY only
handshaking).
consp1
-r fifo-trigger
fifo-trigger should have a value between 0 and 3.
The following table shows the corresponding FIFO
trigger level for a given fifo-trigger value.
Hewlett-Packard Company - 6 - HP-UX 11i Version 2: August 2003
mksf(1M) mksf(1M)
___________________________________________
|fifo-trigger | Receive FIFO Trigger Level |
|_____________|____________________________|
| 0 | 1 |
| 1 | 4 |
| 2 | 8 |
| 3 | 14 |
|_____________|____________________________|
-t Transparent mode (normally used by diagnostics).
-x xmit-limit xmit-limit should have a value between 0 and 3.
The following table shows the corresponding
transmit limit for a given xmit-limit value.
_____________________________
|xmit-limit | Transmit Limit |
|___________|________________|
| 0 | 1 |
| 1 | 4 |
| 2 | 8 |
| 3 | 12 |
|___________|________________|
special-file The default special file name is as follows:
___________________
|Special File Name |
|__________________|
| ttycardp0 |
| |
|__________________|
disc3
-f Floppy.
-r Raw; create character, not block, special file.
-s section The section number.
special-file The default special file name depends on whether
the -r and -s options are used:
Hewlett-Packard Company - 7 - HP-UX 11i Version 2: August 2003
mksf(1M) mksf(1M)
______________________________________________
|-r | -s | Special File Name |
|____|_____|__________________________________|
|yes | no | rdsk/ccardttargetddevice and |
| | | rfloppy/ccardttargetddevice |
|yes | yes | rdsk/ccardttargetddevicessection |
|no | no | dsk/ccardttargetddevice and |
| | | floppy/ccardttargetddevice |
|no | yes | dsk/ccardttargetddevicessection |
|____|_____|__________________________________|
hil
Note that only one of -a, -k, or -r is allowed.
-a address The link address (1-7).
-k Cooked keyboard.
-n The hil controller device.
special-file The default special file name depends on the -a,
-k, and -r options:
____________________________
|Option | Special File Name |
|_______|___________________|
| -a | hil_card.address |
| -k | hilkbd_card |
| -r | rhil_card |
|_______|___________________|
Note the underscore (_) before card. Also note
that for card 0, each file will be linked to a
simpler name without _card, either hiladdress,
hilkbd, or rhil.
lan0 lan1 lan2 lan3
Note that only one of -e or -i is allowed.
-e Ethernet protocol.
-i IEEE 802.3 protocol.
-t Transparent mode (normally used by diagnostics).
special-file The default special file name depends on the -e,
-i, and -t options:
Hewlett-Packard Company - 8 - HP-UX 11i Version 2: August 2003
mksf(1M) mksf(1M)
__________________________________
|Option | -t | Special File Name |
|_______|_____|___________________|
| -e | no | ethercard |
| -e | yes | diag/ethercard |
| -i | no | lancard |
| -i | yes | diag/lancard |
|_______|_____|___________________|
lantty0
-e Exclusive access.
special-file The default special file name depends on whether
the -e option is used:
_________________________
|-e | Special File Name |
|____|___________________|
|no | lanttycard |
|yes | diag/lanttycard |
|____|___________________|
lpr2 lpr3
-c Capital letters. Convert all output to uppercase.
-e Eject page after paper-out recovery.
-n No form-feed.
-o Old paper-out behavior (abort job).
-r Raw.
-t Transparent mode (normally used by diagnostics).
-w No wait. Don't retry errors on open.
special-file The default special file name depends on whether
the -r option is used:
_______________________________
|-r | Special File Name |
|____|_________________________|
|no | ccardttargetddevice_lp |
|yes | ccardttargetddevice_rlp |
|____|_________________________|
mux0 mux2 mux4 pci_mux0
Hewlett-Packard Company - 9 - HP-UX 11i Version 2: August 2003
mksf(1M) mksf(1M)
-a access-mode Port access mode (0-2). The default access mode
is 0 (Direct connect). The access-mode meanings
are:
______________________________
|access-mode | Port Operation |
|____________|________________|
| 0 | Direct connect |
| 1 | Dial out modem |
| 2 | Dial in modem |
|____________|________________|
-c CCITT.
-f Hardware flow control (RTS/CTS).
-i Modem dialer. Cannot be used with -l.
-l Line printer. Cannot be used with -i.
-p port Multiplexer port number (0-15 for mux0 and mux2;
0-1 for mux4; a1 - a16, b1 - b16, c1 - c16 & etc
for the pci_mux0). Some MUX cards controlled by a
particular driver have fewer than the maximum
supported ports.
-t Transparent mode (normally used by diagnostics).
special-file The default special file name depends on the
access-mode and whether the -i and -l options are
used. The term "card" below refers to the
Instance number of the mux card.
_____________________________________________
|access-mode | -i | -l | Special File Name |
|____________|_____|_____|___________________|
| - | no | yes | ccardpport_lp |
| 2 | no | no | ttydcardpport |
| 1 | no | no | culcardpport |
| 0 | yes | no | cuacardpport |
| 0 | no | no | ttycardpport |
|____________|_____|_____|___________________|
pflop sflop
-r Raw; create character, not block, special file.
special-file The default special file name depends on whether
the -r option is used:
Hewlett-Packard Company - 10 - HP-UX 11i Version 2: August 2003
mksf(1M) mksf(1M)
___________________________________
|-r | Special File Name |
|____|_____________________________|
|no | floppy/ccardttargetddevice |
|yes | rfloppy/ccardttargetddevice |
|____|_____________________________|
ps2
Note that only one of -a, or -p is allowed.
-a auto_device Autosearch device. An auto_device value of 0
means first mouse; a value of 1 means first
keyboard.
-p port PS2 port number.
special-file The default special file name depends on the -a,
and -p options:
____________________________
|Option | Special File Name |
|_______|___________________|
| -a 0 | ps2mouse |
| -a 1 | ps2kbd |
| -p | ps2_port |
|_______|___________________|
Note the underscore (_) before port.
SAS console ports See asio0.
SCentIf See CentIf.
scc1
-a access-mode Port access mode (0-2). The default access mode
is 0. The access-mode meanings are:
______________________________
|access-mode | Port Operation |
|____________|________________|
| 0 | Direct connect |
| 1 | Dial out modem |
| 2 | Dial in modem |
|____________|________________|
-b Port B.
-c CCITT.
Hewlett-Packard Company - 11 - HP-UX 11i Version 2: August 2003
mksf(1M) mksf(1M)
-i Modem dialer. Cannot be used with -l.
-l Line printer. Cannot be used with -i.
special-file The default special file name depends on the
access-mode and whether the -i and -l options are
used.
_____________________________________________
|access-mode | -i | -l | Special File Name |
|____________|_____|_____|___________________|
| - | no | yes | ccardpport_lp |
| 2 | no | no | ttydcardpport |
| 1 | no | no | culcardpport |
| 0 | yes | no | cuacardpport |
| 0 | no | no | ttycardpport |
|____________|_____|_____|___________________|
schgr See autox0.
sdisk
-r Raw; create character, not block, special file.
-s section The section number.
special-file The default special file name depends on whether
the -r and -s options are used:
______________________________________________
|-r | -s | Special File Name |
|____|_____|__________________________________|
|yes | no | rdsk/ccardttargetddevice |
|yes | yes | rdsk/ccardttargetddevicessection |
|no | no | dsk/ccardttargetddevice |
|no | yes | dsk/ccardttargetddevicessection |
|____|_____|__________________________________|
sflop See pflop.
stape
-a AT&T-style rewind/close.
-b bpi Bits per inch or tape density. The recognized
values for bpi are:
BEST, D1600, D3480, D3480C, D3590, D3590C, D6250,
D6250C, D800, D8MM_8200, D8MM_8200C, D8MM_8500,
D8MM_8500C, DDS1, DDS1C, DDS2, DDS2C, NOMOD,
QIC_1000, QIC_11, QIC_120, QIC_1350, QIC_150,
QIC_2100, QIC_24, QIC_2GB, QIC_525, QIC_5GB,
DLT_42500_24, DLT_42500_56, DLT_62500_64,
Hewlett-Packard Company - 12 - HP-UX 11i Version 2: August 2003
mksf(1M) mksf(1M)
DLT_81633_64, DLT_62500_64C, DLT_81633_64C,
or a decimal number density code.
-c [code] Compression with optional compression code. The
optional decimal code is used to select a
particular compression algorithm on drives that
support more than one compression algorithm. This
option must be specified at the end of an option
string. See mt(7) for more details.
-e Exhaustive mode. This option allows the driver to
experiment with multiple configuration values in
an attempt to access the media. The default
behavior is to use only the configuration
specified.
-n No rewind on close.
-p Partition one.
-s [block-size]
Fixed block size mode. If a numeric block-size is
given, it is used for a fixed block size. If the
-s option is used alone, a device-specific default
fixed block size is used. This option must be
specified at the end of an option string.
-u UC Berkeley-style rewind/close.
-w Wait (disable immediate reporting).
-x index Use the index value to access the tape device
driver property table entry. Recognized values
for index are decimal values in the range 0 to 30.
special-file Put all tape special files in the /dev/rmt
directory. This is required for proper
maintenance of the Tape Property Table (see
mt(7)). Device files located outside the /dev/rmt
directory may not provide consistent behavior
across system reboots. The default special file
names are dependent on the tape drive being
accessed and the options specified. All default
special files begin with rmt/ccardttargetddevice.
See mt(7) for a complete description of the
default special file naming scheme for tapes.
tape2
-a AT&T-style rewind/close.
Hewlett-Packard Company - 13 - HP-UX 11i Version 2: August 2003
mksf(1M) mksf(1M)
-b bpi Bits per inch or tape density. The recognized
values for bpi are:
BEST, D1600, D3480, D3480C, D6250, D6250C, D800,
D8MM_8200, D8MM_8200C, D8MM_8500, D8MM_8500C,
DDS1, DDS1C, DDS2, DDS2C, NOMOD, QIC_1000, QIC_11,
QIC_120, QIC_1350, QIC_150, QIC_2100, QIC_24,
QIC_2GB, QIC_525, QIC_5GB, DLT_42500_24,
DLT_42500_56, DLT_62500_64, DLT_81633_64,
DLT_62500_64C, DLT_81633_64C,
or a decimal number density code.
-c [code] Compression with optional compression code. The
optional decimal code is used to select a
particular compression algorithm on drives that
support more than one compression algorithm. This
option must be specified at the end of an option
string. See mt(7) for more details.
-n No rewind on close.
-o Console messages disabled.
-t Transparent mode, normally used by diagnostics.
-u UC Berkeley-style rewind/close.
-w Wait (disable immediate reporting).
-x index Use the index value to access the tape device
driver property table entry. The recognized
values for index are decimal values in the range 0
to 30.
-z RTE compatible close.
special-file Put all tape special files in the /dev/rmt
directory. This is required for proper
maintenance of the Tape Property Table (see
mt(7)). Device files located outside the /dev/rmt
directory may not provide consistent behavior
across system reboots. The default special file
names are dependent on the tape drive being
accessed and the options specified. All default
special files begin with rmt/ccardttargetddevice.
See mt(7) for a complete description of the
default special file naming scheme for tapes.
RETURN VALUE [Toc] [Back]
mksf exits with one of the following values:
Hewlett-Packard Company - 14 - HP-UX 11i Version 2: August 2003
mksf(1M) mksf(1M)
0 Successful completion.
1 Failure. An error occurred.
DIAGNOSTICS [Toc] [Back]
Most of the diagnostic messages from mksf are self-explanatory.
Listed below are some messages deserving further clarification.
Errors cause mksf to abort immediately.
Errors [Toc] [Back]
Ambiguous device specification
Matched more than one device in the system. Use some combination
of the -d, -C, -H, and -I options to specify a unique device.
No such device in the system [Toc] [Back]
No device in the system matched the options specified. Use
ioscan to list the devices in the system (see ioscan(1M)).
Device driver name is not in the kernel
Device class name is not in the kernel
The indicated device driver or device class is not present in the
kernel. Add the appropriate device driver and/or device class to
the kernel using kcmodule(1M)).
Device has no instance number [Toc] [Back]
The specified device has not been assigned an instance number.
Use ioscan to assign an instance to the device.
Directory directory doesn't exist
The directory argument of the -D option doesn't exist. Use mkdir
to create the directory (see mkdir(1)).
EXAMPLES [Toc] [Back]
Make a special file named /dev/printer for the line printer device
associated with instance number 2.
mksf -C printer -I 2 /dev/printer
Make a special file, using the default naming convention, for the tape
device at hardware path 8.4.1. The driver-specific options specify
1600 bits per inch and no rewind on close.
mksf -C tape -H 8.4.1 -b D1600 -n
WARNINGS [Toc] [Back]
Many commands and subsystems assume their device files are in /dev;
therefore, the use of the -D option is discouraged.
Hewlett-Packard Company - 15 - HP-UX 11i Version 2: August 2003
mksf(1M) mksf(1M)
AUTHOR [Toc] [Back]
mksf was developed by HP.
FILES [Toc] [Back]
/dev/config I/O system special file
/etc/mtconfig Tape driver property table database
SEE ALSO [Toc] [Back]
mkdir(1), insf(1M), ioscan(1M), kcmodule(1M), lsdev(1M), mknod(1M),
rmsf(1M), mknod(2), ioconfig(4), mknod(5), mt(7).
Hewlett-Packard Company - 16 - HP-UX 11i Version 2: August 2003 [ Back ] |