8980 BIOS clock is sometimes one hour fast
[unleashed.git] / usr / src / man / man1m / putdev.1m
blob4452c11b5633e1ce038862976fb5db74680229dc
1 '\" te
2 .\"  Copyright 1997 AT&T  Copyright (c) 1997 Sun Microsystems, Inc.  All Rights Reserved.
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 PUTDEV 1M "Apr 3, 1997"
7 .SH NAME
8 putdev \- edits device table
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBputdev\fR \fB-a\fR \fIalias\fR [\fIattribute\fR=\fIvalue\fR [...]]
13 .fi
15 .LP
16 .nf
17 \fBputdev\fR \fB-m\fR \fIdevice\fR \fIattribute\fR=\fIvalue\fR [\fIattribute\fR = \fIvalue\fR [...]]
18 .fi
20 .LP
21 .nf
22 \fBputdev\fR \fB-d\fR \fIdevice\fR [\fIattribute\fR [...]]
23 .fi
25 .SH DESCRIPTION
26 .sp
27 .LP
28 \fBputdev\fR adds a new device to the device table, modifies an existing device
29 description or removes a device entry from the table. The first synopsis is
30 used to add a device. The second synopsis is used to modify existing entries by
31 adding or changing attributes. If a specified attribute is not defined, this
32 option adds that attribute to the device definition. If a specified attribute
33 is already defined, it modifies the attribute definition. The third synopsis is
34 used to delete either an entire device entry or, if the attribute argument is
35 used, to delete an attribute assignment for a device.
36 .SH OPTIONS
37 .sp
38 .LP
39 The following options are supported:
40 .sp
41 .ne 2
42 .na
43 \fB\fB-a\fR\fR
44 .ad
45 .RS 6n
46 Add a device to the device table using the specified attributes. The device
47 must be referenced by its \fBalias\fR.
48 .RE
50 .sp
51 .ne 2
52 .na
53 \fB\fB-d\fR\fR
54 .ad
55 .RS 6n
56 Remove a device from the device table, when executed without the
57 \fIattributes\fR argument. Used with the \fIattribute\fR argument, it deletes
58 the given attribute specification for \fIdevice\fR from the table.
59 .RE
61 .sp
62 .ne 2
63 .na
64 \fB\fB-m\fR\fR
65 .ad
66 .RS 6n
67 Modify a device entry in the device table. If an entry already exists, it adds
68 any specified attributes that are not defined. It also modifies any attributes
69 which already have a value  with the value specified by this command.
70 .RE
72 .SH OPERANDS
73 .sp
74 .LP
75 The following operands are supported:
76 .sp
77 .ne 2
78 .na
79 \fB\fIalias\fR\fR
80 .ad
81 .RS 13n
82 Designates the alias of the device to be added.
83 .RE
85 .sp
86 .ne 2
87 .na
88 \fB\fIattribute\fR\fR
89 .ad
90 .RS 13n
91 Designates a device attribute to be added, modified, or deleted. Can be any of
92 the device attributes described under \fBDEVICE\fR \fBATTRIBUTES\fR except
93 \fBalias\fR. This prevents an accidental modification or deletion of a device's
94 alias from the table.
95 .RE
97 .sp
98 .ne 2
99 .na
100 \fB\fIdevice\fR\fR
102 .RS 13n
103 Designates the pathname or alias of the device  whose attribute is to be added,
104 modified, or removed.
108 .ne 2
110 \fB\fIvalue\fR\fR
112 .RS 13n
113 Designates the value to be assigned to a device's attribute.
116 .SH DEVICE ATTRIBUTES
119 The following list shows the standard device attributes, used by applications
120 such as \fBufsdump\fR(1M) and \fBufsrestore\fR(1M), which can be defined for a
121 device. You are not limited to this list, you can define any attribute you
122 like.
124 .ne 2
126 \fB\fBalias\fR\fR
128 .RS 13n
129 The unique name by which a device is known. No two devices in the database may
130 share the same alias name. The name is limited in length to 14 characters and
131 should contain only alphanumeric characters and the following special
132 characters if they are escaped with a backslash:  underscore ( _ ), dollar sign
133 ($), hyphen (\(mi), and period (.).
137 .ne 2
139 \fB\fBbdevice\fR\fR
141 .RS 13n
142 The pathname to the block special device node associated with the device, if
143 any. The associated major/minor combination should be unique within the
144 database and should match that associated with the \fBcdevice\fR field, if any.
145 (It is the administrator's responsibility to ensure that these
146 \fBmajor/minor\fR numbers are unique in the database.)
150 .ne 2
152 \fB\fBcapacity\fR\fR
154 .RS 13n
155 The capacity of the device or of the typical volume, if removable.
159 .ne 2
161 \fB\fBcdevice\fR\fR
163 .RS 13n
164 The pathname to the character special device node associated with the device,
165 if any. The associated major/minor combination should be unique within the
166 database and should match that associated with the \fBbdevice\fR field, if any.
167 (It is the administrator's responsibility to ensure that these
168 \fBmajor/minor\fR numbers are unique in the database.)
172 .ne 2
174 \fB\fBcyl\fR\fR
176 .RS 13n
177 Used by the command specified in the \fBmkfscmd\fR attribute.
181 .ne 2
183 \fB\fBdesc\fR\fR
185 .RS 13n
186 A description of any instance of a volume associated with this device (such as
187 floppy diskette).
191 .ne 2
193 \fB\fBdpartlist\fR\fR
195 .RS 13n
196 The list of disk partitions associated with this device. Used only if
197 \fBtype=disk\fR. The list should contain device aliases, each of which must
198 have \fBtype=dpart\fR.
202 .ne 2
204 \fB\fBdparttype\fR\fR
206 .RS 13n
207 The type of disk partition represented by this device. Used only if
208 \fBtype=dpart\fR. It should be either \fBfs\fR (for file system) or \fBdp\fR
209 (for data partition).
213 .ne 2
215 \fB\fBerasecmd\fR\fR
217 .RS 13n
218 The command string that, when executed, erases the device.
222 .ne 2
224 \fB\fBfmtcmd\fR\fR
226 .RS 13n
227 The command string that, when executed, formats the device.
231 .ne 2
233 \fB\fBfsname\fR\fR
235 .RS 13n
236 The file system name on the file system administered on this partition, as
237 supplied to the \fB/usr/sbin/labelit\fR command. This attribute is specified
238 only if \fBtype=dpart\fR and \fBdparttype=fs\fR.
242 .ne 2
244 \fB\fBgap\fR\fR
246 .RS 13n
247 Used by the command specified in the \fBmkfscmd\fR attribute.
251 .ne 2
253 \fB\fBmkfscmd\fR\fR
255 .RS 13n
256 The command string that, when executed, places a file system on a previously
257 formatted device.
261 .ne 2
263 \fB\fBmountpt\fR\fR
265 .RS 13n
266 The default mount point to use for the device. Used only if the device is
267 mountable. For disk partitions where \fBtype=dpart\fR and \fBdparttype=fs\fR,
268 this attribute should specify the location where the partition is normally
269 mounted.
273 .ne 2
275 \fB\fBnblocks\fR\fR
277 .RS 13n
278 The number of blocks in the file system administered on this partition. Used
279 only if \fBtype=dpart\fR and \fBdparttype=fs\fR.
283 .ne 2
285 \fB\fBninodes\fR\fR
287 .RS 13n
288 The number of inodes in the file system administered on this partition. Used
289 only if \fBtype=dpart\fR and \fBdparttype=fs\fR.
293 .ne 2
295 \fB\fBnorewind\fR\fR
297 .RS 13n
298 The name of the character special device node that allows access to the serial
299 device without rewinding when the device is closed.
303 .ne 2
305 \fB\fBpathname\fR\fR
307 .RS 13n
308 Defines the pathname to an i-node describing the device (used for non-block or
309 character device pathnames, such as directories).
313 .ne 2
315 \fB\fBtype\fR\fR
317 .RS 13n
318 A token that represents inherent qualities of the device. Standard types
319 include: 9-track, ctape, disk, directory, diskette, dpart, and qtape.
323 .ne 2
325 \fB\fBvolname\fR\fR
327 .RS 13n
328 The volume name on the file system administered on this partition, as supplied
329 to the \fB/usr/sbin/labelit\fR command. Used only if \fBtype=dpart\fR and
330 \fBdparttype=fs\fR.
334 .ne 2
336 \fB\fBvolume\fR\fR
338 .RS 13n
339 A text string used to describe any instance of a volume associated with this
340 device. This attribute should not be defined for devices which are not
341 removable.
344 .SH EXIT STATUS
347 The following exit values are returned:
349 .ne 2
351 \fB\fB0\fR\fR
353 .RS 5n
354 Successful completion.
358 .ne 2
360 \fB\fB1\fR\fR
362 .RS 5n
363 Command syntax was incorrect, an invalid option was used, or an internal error
364 occurred.
368 .ne 2
370 \fB\fB2\fR\fR
372 .RS 5n
373 The device table could not be opened for reading, or a new device table could
374 not be created.
378 .ne 2
380 \fB\fB3\fR\fR
382 .RS 5n
383 If executed with the \fB-a\fR option, indicates that an entry in the device
384 table with the alias \fBalias\fR already exits. If executed with the \fB-m\fR
385 or \fB-d\fR options, indicates that no entry exists for device \fIdevice\fR.
389 .ne 2
391 \fB\fB4\fR\fR
393 .RS 5n
394 Indicates that  \fB-d\fR was requested and one or more of the specified
395 attributes were not defined for the device.
398 .SH FILES
400 .ne 2
402 \fB\fB/etc/device.tab\fR\fR
404 .RS 19n
408 .SH SEE ALSO
411 \fBdevattr\fR(1M), \fBputdgrp\fR(1M), \fBufsdump\fR(1M), \fBufsrestore\fR(1M),
412 \fBattributes\fR(5)
415 \fI\fR