summaryrefslogtreecommitdiff
path: root/usr/src/man/man8/putdev.8
blob: f9bbbc8b4eb07675a0f941bf2eac137c6202d63e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
'\" te
.\"  Copyright 1997 AT&T  Copyright (c) 1997 Sun Microsystems, Inc.  All Rights Reserved.
.\" 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.
.\" 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.
.\" 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]
.TH PUTDEV 8 "Apr 3, 1997"
.SH NAME
putdev \- edits device table
.SH SYNOPSIS
.LP
.nf
\fBputdev\fR \fB-a\fR \fIalias\fR [\fIattribute\fR=\fIvalue\fR [...]]
.fi

.LP
.nf
\fBputdev\fR \fB-m\fR \fIdevice\fR \fIattribute\fR=\fIvalue\fR [\fIattribute\fR = \fIvalue\fR [...]]
.fi

.LP
.nf
\fBputdev\fR \fB-d\fR \fIdevice\fR [\fIattribute\fR [...]]
.fi

.SH DESCRIPTION
.sp
.LP
\fBputdev\fR adds a new device to the device table, modifies an existing device
description or removes a device entry from the table. The first synopsis is
used to add a device. The second synopsis is used to modify existing entries by
adding or changing attributes. If a specified attribute is not defined, this
option adds that attribute to the device definition. If a specified attribute
is already defined, it modifies the attribute definition. The third synopsis is
used to delete either an entire device entry or, if the attribute argument is
used, to delete an attribute assignment for a device.
.SH OPTIONS
.sp
.LP
The following options are supported:
.sp
.ne 2
.na
\fB\fB-a\fR\fR
.ad
.RS 6n
Add a device to the device table using the specified attributes. The device
must be referenced by its \fBalias\fR.
.RE

.sp
.ne 2
.na
\fB\fB-d\fR\fR
.ad
.RS 6n
Remove a device from the device table, when executed without the
\fIattributes\fR argument. Used with the \fIattribute\fR argument, it deletes
the given attribute specification for \fIdevice\fR from the table.
.RE

.sp
.ne 2
.na
\fB\fB-m\fR\fR
.ad
.RS 6n
Modify a device entry in the device table. If an entry already exists, it adds
any specified attributes that are not defined. It also modifies any attributes
which already have a value  with the value specified by this command.
.RE

.SH OPERANDS
.sp
.LP
The following operands are supported:
.sp
.ne 2
.na
\fB\fIalias\fR\fR
.ad
.RS 13n
Designates the alias of the device to be added.
.RE

.sp
.ne 2
.na
\fB\fIattribute\fR\fR
.ad
.RS 13n
Designates a device attribute to be added, modified, or deleted. Can be any of
the device attributes described under \fBDEVICE\fR \fBATTRIBUTES\fR except
\fBalias\fR. This prevents an accidental modification or deletion of a device's
alias from the table.
.RE

.sp
.ne 2
.na
\fB\fIdevice\fR\fR
.ad
.RS 13n
Designates the pathname or alias of the device  whose attribute is to be added,
modified, or removed.
.RE

.sp
.ne 2
.na
\fB\fIvalue\fR\fR
.ad
.RS 13n
Designates the value to be assigned to a device's attribute.
.RE

.SH DEVICE ATTRIBUTES
.sp
.LP
The following list shows the standard device attributes, used by applications
such as \fBufsdump\fR(8) and \fBufsrestore\fR(8), which can be defined for a
device. You are not limited to this list, you can define any attribute you
like.
.sp
.ne 2
.na
\fB\fBalias\fR\fR
.ad
.RS 13n
The unique name by which a device is known. No two devices in the database may
share the same alias name. The name is limited in length to 14 characters and
should contain only alphanumeric characters and the following special
characters if they are escaped with a backslash:  underscore ( _ ), dollar sign
($), hyphen (\(mi), and period (.).
.RE

.sp
.ne 2
.na
\fB\fBbdevice\fR\fR
.ad
.RS 13n
The pathname to the block special device node associated with the device, if
any. The associated major/minor combination should be unique within the
database and should match that associated with the \fBcdevice\fR field, if any.
(It is the administrator's responsibility to ensure that these
\fBmajor/minor\fR numbers are unique in the database.)
.RE

.sp
.ne 2
.na
\fB\fBcapacity\fR\fR
.ad
.RS 13n
The capacity of the device or of the typical volume, if removable.
.RE

.sp
.ne 2
.na
\fB\fBcdevice\fR\fR
.ad
.RS 13n
The pathname to the character special device node associated with the device,
if any. The associated major/minor combination should be unique within the
database and should match that associated with the \fBbdevice\fR field, if any.
(It is the administrator's responsibility to ensure that these
\fBmajor/minor\fR numbers are unique in the database.)
.RE

.sp
.ne 2
.na
\fB\fBcyl\fR\fR
.ad
.RS 13n
Used by the command specified in the \fBmkfscmd\fR attribute.
.RE

.sp
.ne 2
.na
\fB\fBdesc\fR\fR
.ad
.RS 13n
A description of any instance of a volume associated with this device (such as
floppy diskette).
.RE

.sp
.ne 2
.na
\fB\fBdpartlist\fR\fR
.ad
.RS 13n
The list of disk partitions associated with this device. Used only if
\fBtype=disk\fR. The list should contain device aliases, each of which must
have \fBtype=dpart\fR.
.RE

.sp
.ne 2
.na
\fB\fBdparttype\fR\fR
.ad
.RS 13n
The type of disk partition represented by this device. Used only if
\fBtype=dpart\fR. It should be either \fBfs\fR (for file system) or \fBdp\fR
(for data partition).
.RE

.sp
.ne 2
.na
\fB\fBerasecmd\fR\fR
.ad
.RS 13n
The command string that, when executed, erases the device.
.RE

.sp
.ne 2
.na
\fB\fBfmtcmd\fR\fR
.ad
.RS 13n
The command string that, when executed, formats the device.
.RE

.sp
.ne 2
.na
\fB\fBfsname\fR\fR
.ad
.RS 13n
The file system name on the file system administered on this partition, as
supplied to the \fB/usr/sbin/labelit\fR command. This attribute is specified
only if \fBtype=dpart\fR and \fBdparttype=fs\fR.
.RE

.sp
.ne 2
.na
\fB\fBgap\fR\fR
.ad
.RS 13n
Used by the command specified in the \fBmkfscmd\fR attribute.
.RE

.sp
.ne 2
.na
\fB\fBmkfscmd\fR\fR
.ad
.RS 13n
The command string that, when executed, places a file system on a previously
formatted device.
.RE

.sp
.ne 2
.na
\fB\fBmountpt\fR\fR
.ad
.RS 13n
The default mount point to use for the device. Used only if the device is
mountable. For disk partitions where \fBtype=dpart\fR and \fBdparttype=fs\fR,
this attribute should specify the location where the partition is normally
mounted.
.RE

.sp
.ne 2
.na
\fB\fBnblocks\fR\fR
.ad
.RS 13n
The number of blocks in the file system administered on this partition. Used
only if \fBtype=dpart\fR and \fBdparttype=fs\fR.
.RE

.sp
.ne 2
.na
\fB\fBninodes\fR\fR
.ad
.RS 13n
The number of inodes in the file system administered on this partition. Used
only if \fBtype=dpart\fR and \fBdparttype=fs\fR.
.RE

.sp
.ne 2
.na
\fB\fBnorewind\fR\fR
.ad
.RS 13n
The name of the character special device node that allows access to the serial
device without rewinding when the device is closed.
.RE

.sp
.ne 2
.na
\fB\fBpathname\fR\fR
.ad
.RS 13n
Defines the pathname to an i-node describing the device (used for non-block or
character device pathnames, such as directories).
.RE

.sp
.ne 2
.na
\fB\fBtype\fR\fR
.ad
.RS 13n
A token that represents inherent qualities of the device. Standard types
include: 9-track, ctape, disk, directory, diskette, dpart, and qtape.
.RE

.sp
.ne 2
.na
\fB\fBvolname\fR\fR
.ad
.RS 13n
The volume name on the file system administered on this partition, as supplied
to the \fB/usr/sbin/labelit\fR command. Used only if \fBtype=dpart\fR and
\fBdparttype=fs\fR.
.RE

.sp
.ne 2
.na
\fB\fBvolume\fR\fR
.ad
.RS 13n
A text string used to describe any instance of a volume associated with this
device. This attribute should not be defined for devices which are not
removable.
.RE

.SH EXIT STATUS
.sp
.LP
The following exit values are returned:
.sp
.ne 2
.na
\fB\fB0\fR\fR
.ad
.RS 5n
Successful completion.
.RE

.sp
.ne 2
.na
\fB\fB1\fR\fR
.ad
.RS 5n
Command syntax was incorrect, an invalid option was used, or an internal error
occurred.
.RE

.sp
.ne 2
.na
\fB\fB2\fR\fR
.ad
.RS 5n
The device table could not be opened for reading, or a new device table could
not be created.
.RE

.sp
.ne 2
.na
\fB\fB3\fR\fR
.ad
.RS 5n
If executed with the \fB-a\fR option, indicates that an entry in the device
table with the alias \fBalias\fR already exits. If executed with the \fB-m\fR
or \fB-d\fR options, indicates that no entry exists for device \fIdevice\fR.
.RE

.sp
.ne 2
.na
\fB\fB4\fR\fR
.ad
.RS 5n
Indicates that  \fB-d\fR was requested and one or more of the specified
attributes were not defined for the device.
.RE

.SH FILES
.sp
.ne 2
.na
\fB\fB/etc/device.tab\fR\fR
.ad
.RS 19n

.RE

.SH SEE ALSO
.sp
.LP
.BR attributes (7),
.BR devattr (8),
.BR putdgrp (8),
.BR ufsdump (8),
.BR ufsrestore (8)
.sp
.LP
\fI\fR