1devreserv(1M)           System Administration Commands           devreserv(1M)
2
3
4

NAME

6       devreserv - reserve devices for exclusive use
7

SYNOPSIS

9       devreserv [key [device-list]...]
10
11

DESCRIPTION

13       devreserv  reserves  devices  for  exclusive use. When the device is no
14       longer required, use  devfree to release it.
15
16
17       devreserv reserves at most one device per  device-list.  Each  list  is
18       searched  in linear order until the first available device is found. If
19       a device cannot be reserved from  each  list,  the  entire  reservation
20       fails.
21
22
23       When  devreserv is invoked without arguments, it lists the devices that
24       are currently reserved and shows to which key  it  was  reserved.  When
25       devreserv  is invoked with only the  key argument, it lists the devices
26       that are currently reserved to that key.
27

OPERANDS

29       The following operands are supported:
30
31       device-list    Defines a list of devices that devreserv will search  to
32                      find  an available device. The list must be formatted as
33                      a single argument to the shell.
34
35
36       key            Designates a unique key on  which  the  device  will  be
37                      reserved. The key must be a positive integer.
38
39

EXAMPLES

41       Example 1 Reserving a Floppy Disk and a Cartridge Tape
42
43
44       The following example reserves a floppy disk and a cartridge tape:
45
46
47         $ key=$$
48         $ echo "The current Process ID is equal to: $key"
49           The Current Process ID is equal to: 10658
50         $ devreserv $key diskette1 ctape1
51
52
53
54       Example 2 Listing All Devices Currently Reserved
55
56
57       The following example lists all devices currently reserved:
58
59
60         $ devreserv
61           disk1         2423
62           diskette1     10658
63           ctape1        10658
64
65
66
67       Example 3 Listing All Devices Currently Reserved to a Particular Key
68
69
70       The following example lists all devices currently reserved to a partic‐
71       ular key:
72
73
74         $ devreserv $key
75           diskette1
76           ctape1
77
78
79

EXIT STATUS

81       The following exit values are returned:
82
83       0    Successful completion.
84
85
86       1    Command syntax was incorrect, an invalid was option  used,  or  an
87            internal error occurred.
88
89
90       2    Device  table  or device reservation table could not be opened for
91            reading.
92
93
94       3    Device reservation request could not be fulfilled.
95
96

FILES

98       /etc/device.tab
99
100
101       /etc/devlkfile
102
103

ATTRIBUTES

105       See attributes(5) for descriptions of the following attributes:
106
107
108
109
110       ┌─────────────────────────────┬─────────────────────────────┐
111       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
112       ├─────────────────────────────┼─────────────────────────────┤
113       │Availability                 │SUNWcsu                      │
114       └─────────────────────────────┴─────────────────────────────┘
115

SEE ALSO

117       devfree(1M), attributes(5)
118

NOTES

120       The commands devreserv and devfree are used to manage the  availability
121       of devices on a system. Their use is  on a participatory basis and they
122       do not place any  constraints on the actual access to the device.  They
123       serve  as  a  centralized  bookkeeping  point for those who wish to use
124       them. Devices which have been reserved  cannot  be  used  by  processes
125       which  utilize  the  device reservation functions until the reservation
126       has been canceled. However, processes that do not use  device  reserva‐
127       tion may use a device that has been reserved since such a process would
128       not have checked for its reservation status.
129
130
131
132SunOS 5.11                        5 Jul 1990                     devreserv(1M)
Impressum