1volmgt_root(3VOLMGT) Volume Management Library Functions volmgt_root(3VOLMGT)
2
3
4
6 volmgt_root - return the volume management root directory
7
9 cc [ flag... ] file... -lvolmgt [ library ... ]
10 #include <volmgt.h>
11 const char *volmgt_root(void);
12
13
15 This function is obsolete. The management of removable media by the
16 Volume Management feature, including vold, has been replaced by soft‐
17 ware that supports the Hardware Abstraction Layer (HAL). Programmatic
18 support for HAL is through the HAL APIs, which are documented on the
19 HAL web site. See hal(5). The return value of this function is unde‐
20 fined.
21
22
23 The volmgt_root() function returns the current volume management root
24 directory, which by default is /vol but can be configured to be in a
25 different location.
26
28 The return from this function is undefined.
29
31 This function may fail if an open() of /dev/volctl fails. If this
32 occurs a pointer to the default Volume Management root directory is
33 returned.
34
36 Example 1 Finding the Volume Management Root directory.
37
38
39 To find out where the volume management root directory is:
40
41
42 if ((path = volmgt_root()) != NULL) {
43 (void) printf("Volume Management root dir=%s\n", path);
44 } else {
45 (void) printf("can't find Volume Management root dir\n");
46 }
47
48
50 /dev default location for the volume management root directory
51
52
54 See attributes(5) for descriptions of the following attributes:
55
56
57
58
59 ┌─────────────────────────────┬─────────────────────────────┐
60 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
61 ├─────────────────────────────┼─────────────────────────────┤
62 │MT-Level │MT-Safe │
63 ├─────────────────────────────┼─────────────────────────────┤
64 │Interface Stability │Obsolete │
65 └─────────────────────────────┴─────────────────────────────┘
66
68 open(2), volmgt_check(3VOLMGT), volmgt_inuse(3VOLMGT), volmgt_run‐
69 ning(3VOLMGT), attributes(5), hal(5)
70
72 This function returns the default root directory location even when
73 volume management is not running.
74
75
76
77SunOS 5.11 8 Mar 2007 volmgt_root(3VOLMGT)