xref: /illumos-gate/usr/src/cmd/devfsadm/devlink.tab.sh (revision 069e6b7e31ba5dcbc5441b98af272714d9a5455c)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright (c) 1998, 2000 by Sun Microsystems, Inc.
24# All rights reserved.
25#
26#ident	"%Z%%M%	%I%	%E% SMI"
27#
28# This is the script that generates the devlink.tab file. It is
29# architecture-aware, and dumps different stuff for x86 and sparc.
30# There is a lot of common entries, which are dumped first.
31#
32# the SID of this script, and the SID of the dumped script are
33# always the same.
34#
35
36cat <<EOM
37#ident   "%Z%%M% %I%     %E% SMI"
38#
39# Copyright (c) 1998 by Sun Microsystems, Inc.
40#
41#
42# This is the table used by devlinks
43#
44# Each entry should have 2 fields; but may have 3.  Fields are separated
45# by single tab ('\t') characters.
46#
47# The fields are:
48#
49# devfs-spec: a keyword-value set of devfs specifications, describing the set
50#	of devfs node entries to be linked.
51#
52#	The keywords are:
53#
54#	type - The devinfo node type (see <sys/sunddi.h> for possible values)
55#
56#	name - the devinfo node name (the part of a /devices entry that appears
57#		before the '@' or ':').
58#
59#	addr - the devinfo node address part (the portion of the name between
60#		the '@' and the ':').
61#
62#	minor - the minor-attributes (the portion of a /devices name after the
63#		':').
64#
65#	The keywords are separated from their valuse by an equals ('=') sign;
66#	keyword-value pairs are separated from each other by semicolons (';').
67#
68# dev name - the /dev name corresponding to the devfs node described by
69#	the devfs-spec field.  This specification is assume to start rooted at
70#	/dev; THE INITIAL /dev/ SHOULD NOT BE SPECIFIED!
71#	The name can contain a number of escape-sequences to include parts of
72#	the devfs-name in the /dev/-name.  These escape-sequences all start with
73#	a backslash ('\') character.  The current sequences are:
74#
75#	\D - the devfs 'name' field
76#
77#	\An - the 'n'th component of the address field (n=0 means the whole
78#		address field)
79#
80#	\Mn - the 'n'th component of the minor field (n=0 means the entire
81#		minor field).
82#
83#	\Nn - a sequential counter, starting at n (a *single* digit, giving
84#		a starting range of 0 through 9).
85#
86# extra dev link - a few devices need a second link; that is, a second link
87#	pointing to the first link.  This optional field specifies the /dev
88#	format of this second link.  This entry can also use the above-described
89#	escape-sequences.
90#
91# Fields can be blank; seperated by single tab characters,
92# Spaces are significant, and are considered part of a field. IN GENERAL THIS
93# MEANS THERE SHOULD BE NO SPACE CHARACTERS IN THIS FILE!
94# All fields must be present (even if blank)
95#
96#
97# devfs-spec	Dev-Namespec	Extra-Link
98#
99EOM
100
101case "$MACH" in
102  "i386" )
103	#
104	# These are the x86 specific entries
105	# It depends on the build machine being an x86
106	#
107	cat <<-EOM
108	EOM
109	;;
110  "sparc" )
111	#
112	# These are the sparc specific entries
113	# It depends on the build machine being an sparc
114	#
115	cat <<-EOM
116	EOM
117	;;
118  * )
119	echo "Unknown Architecture"
120	exit 1
121	;;
122esac
123