2 .\" Copyright (c) 1996, 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 VOLMGT_RELEASE 3VOLMGT "Mar 8, 2007"
8 volmgt_release \- release removable media device reservation
12 \fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lvolmgt\fR [ \fIlibrary\fR ... ]
17 \fBint\fR \fBvolmgt_release\fR(\fBchar *\fR\fIdev\fR);
23 This function is obsolete. The management of removable media by the Volume
24 Management feature, including \fBvold\fR, has been replaced by software that
25 supports the Hardware Abstraction Layer (HAL). Programmatic support for HAL is
26 through the HAL APIs, which are documented on the HAL web site. See
27 \fBhal\fR(5). The return value of this function is undefined.
30 The \fBvolmgt_release()\fR routine releases the removable media device
31 reservation specified as \fIdev\fR. See \fBvolmgt_acquire\fR(3VOLMGT) for a
32 description of \fIdev\fR.
35 If \fIdev\fR is reserved by the caller, \fBvolmgt_release()\fR updates the
36 internal device reservation database to indicate that the device is no longer
37 reserved. If the requested device is reserved by another process, the release
38 attempt fails and \fBerrno\fR is set to \fB0\fR.
42 The return from this function is undefined.
46 On failure, \fBvolmgt_release()\fR returns \fB0\fR, and sets \fBerrno\fR for
47 one of the following conditions:
54 \fIdev\fR was invalid or missing.
63 \fIdev\fR was not reserved by the caller.
68 \fBExample 1 \fRUsing \fBvolmgt_release()\fR
71 In the following example, volume management is running, and the first floppy
72 drive is reserved, accessed and released.
79 if (!volmgt_acquire("floppy0", "FileMgr", 0, &errp,
81 /* handle error case */
84 /* floppy acquired - now access it */
85 if (!volmgt_release("floppy0")) {
86 /* handle error case */
95 See \fBattributes\fR(5) for descriptions of the following attributes:
103 ATTRIBUTE TYPE ATTRIBUTE VALUE
107 Interface Stability Obsolete
113 \fBvolmgt_acquire\fR(3VOLMGT), \fBattributes\fR(5), \fBhal\fR(5)