1volmgt_release(3VOLMGT)Volume Management Library Functionvsolmgt_release(3VOLMGT)
2
3
4

NAME

6       volmgt_release - release removable media device reservation
7

SYNOPSIS

9       cc [ flag ... ] file ... -lvolmgt [ library ... ]
10       #include <volmgt.h>
11
12
13
14       int volmgt_release(char *dev);
15
16

DESCRIPTION

18       This  function  is  obsolete.  The management of removable media by the
19       Volume Management feature, including vold, has been replaced  by  soft‐
20       ware  that  supports the Hardware Abstraction Layer (HAL). Programmatic
21       support for HAL is through the HAL APIs, which are  documented  on  the
22       HAL  web  site.  See hal(5). The return value of this function is unde‐
23       fined.
24
25
26       The  volmgt_release()  routine  releases  the  removable  media  device
27       reservation   specified  as  dev.  See  volmgt_acquire(3VOLMGT)  for  a
28       description of dev.
29
30
31       If  dev is reserved by the caller,  volmgt_release() updates the inter‐
32       nal  device  reservation  database  to  indicate  that the device is no
33       longer reserved.  If  the  requested  device  is  reserved  by  another
34       process, the release attempt fails and errno is set to  0.
35

RETURN VALUES

37       The return from this function is undefined.
38

ERRORS

40       On failure, volmgt_release() returns  0, and sets  errno for one of the
41       following conditions:
42
43       EINVAL    dev was invalid or missing.
44
45
46       EBUSY     dev was not reserved by the caller.
47
48

EXAMPLES

50       Example 1 Using volmgt_release()
51
52
53       In the following example, volume management is running, and  the  first
54       floppy drive is reserved, accessed and released.
55
56
57         #include <volmgt.h>
58         char *errp;
59         if (!volmgt_acquire("floppy0", "FileMgr", 0, &errp,
60             NULL)) {
61              /* handle error case */
62              ...
63         }
64         /* floppy acquired - now access it */
65         if (!volmgt_release("floppy0")) {
66              /* handle error case */
67              ...
68         }
69
70

ATTRIBUTES

72       See attributes(5) for descriptions of the following attributes:
73
74
75
76
77       ┌─────────────────────────────┬─────────────────────────────┐
78       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
79       ├─────────────────────────────┼─────────────────────────────┤
80       │MT-Level                     │MT-Safe                      │
81       ├─────────────────────────────┼─────────────────────────────┤
82       │Interface Stability          │Obsolete                     │
83       └─────────────────────────────┴─────────────────────────────┘
84

SEE ALSO

86       volmgt_acquire(3VOLMGT), attributes(5), hal(5)
87
88
89
90SunOS 5.11                        8 Mar 2007           volmgt_release(3VOLMGT)
Impressum