nightly: remove unused BINARCHIVE
[unleashed.git] / share / man / man4 / ttysrch.4
blob65043b9a2a965adee0d235ae4bf2c4e003a0d8bc
1 '\" te
2 .\"  Copyright 1989 AT&T
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH TTYSRCH 4 "Feb 23, 1994"
7 .SH NAME
8 ttysrch \- directory search list for ttyname
9 .SH DESCRIPTION
10 .sp
11 .LP
12 \fBttysrch\fR is an optional file that is used by the \fBttyname\fR library
13 routine. This file contains the names of directories in \fB/dev\fR that contain
14 terminal and terminal-related device files. The purpose of this file is to
15 improve the performance of \fBttyname\fR by indicating which subdirectories in
16 \fB/dev\fR contain terminal-related device files and should be searched first.
17 These subdirectory names must appear on separate lines and must begin with
18 \fB/dev\fR. Those path names that do not begin with \fB/dev\fR will be ignored
19 and a warning will be sent to the console. Blank lines (lines containing only
20 white space) and lines beginning with the comment character "#" will be
21 ignored. For each file listed (except for the special entry \fB/dev\fR),
22 \fBttyname\fR will recursively search through subdirectories looking for a
23 match. If \fB/dev\fR appears in the \fBttysrch\fR file, the \fB/dev\fR
24 directory itself will be searched but there will not be a recursive search
25 through its subdirectories.
26 .sp
27 .LP
28 When \fBttyname\fR searches through the device files, it tries to find a file
29 whose major/minor device number, file system identifier, and inode number match
30 that of the file descriptor it was given as an argument. If a match is not
31 found, it will settle for a match of just major/minor device and file system
32 identifier, if one can be found. However, if the file descriptor is associated
33 with a cloned device, this algorithm does not work efficiently because the
34 inode number  of the device file associated with a clonable device will never
35 match the inode number of the file descriptor that was returned by the open of
36 that clonable device. To help with these situations, entries can be put into
37 the \fB/etc/ttysrch\fR file to improve performance when cloned devices are used
38 as terminals  on a system (for example, for remote login). However, this is
39 only useful if the minor devices related to a cloned device are put into a
40 subdirectory. (It is important to note that device files need not exist for
41 cloned devices and if that is the case, \fBttyname\fR will eventually fail.) An
42 optional second field is used in the \fB/etc/ttysrch\fR file to indicate the
43 matching criteria. This field is separated by white space (any combination of
44 blanks or tabs). The letter \fBM\fR means major/minor device number, \fBF\fR
45 means file system identifier, and \fBI\fR means inode number. If this field is
46 not specified for an entry, the default is \fBMFI\fR which means try to match
47 on all three. For cloned devices the field should be \fBMF\fR, which indicates
48 that it is not necessary to match on the inode number.
49 .sp
50 .LP
51 Without the \fB/etc/ttysrch\fR file, \fBttyname\fR will search the \fB/dev\fR
52 directory by first looking in the directories \fB/dev/term\fR, \fB/dev/pts\fR,
53 and \fB/dev/xt\fR. If a system has terminal devices installed in directories
54 other than these, it may help performance if the \fBttysrch\fR file is created
55 and contains that list of directories.
56 .SH EXAMPLES
57 .LP
58 \fBExample 1 \fRA sample display of \fB/etc/ttysrch\fR command.
59 .sp
60 .LP
61 A sample \fB/etc/ttysrch\fR file follows:
63 .sp
64 .in +2
65 .nf
66 /dev/term     MFI
67 /dev/pts      MFI
68 /dev/xt       MFI
69 /dev/slan     MF
70 .fi
71 .in -2
72 .sp
74 .sp
75 .LP
76 This file tells  \fBttyname\fR that it should first search through those
77 directories listed  and that when searching through the \fB/dev/slan\fR
78 directory, if a file is encountered whose major/minor devices and file system
79 identifier match that of the file descriptor argument to \fBttyname\fR, this
80 device name should be considered a match.
82 .SH FILES
83 .sp
84 .ne 2
85 .na
86 \fB\fB/etc/ttysrch\fR\fR
87 .ad
88 .RS 16n
90 .RE
92 .SH SEE ALSO
93 .sp
94 .LP
95 \fBttyname\fR(3C)