1volmgt_inuse(3VOLMGT) Volume Management Library Functionsvolmgt_inuse(3VOLMGT)
2
3
4

NAME

6       volmgt_inuse  -  check  whether  or not volume management is managing a
7       pathname
8

SYNOPSIS

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

DESCRIPTION

17       This function is obsolete. The management of  removable  media  by  the
18       Volume  Management  feature, including vold, has been replaced by soft‐
19       ware that supports the Hardware Abstraction Layer  (HAL).  Programmatic
20       support  for  HAL  is through the HAL APIs, which are documented on the
21       HAL web site. See hal(5). The return value of this  function  is  unde‐
22       fined.
23
24
25       volmgt_inuse()  checks whether volume management is managing the speci‐
26       fied pathname.
27

RETURN VALUES

29       The return from this function is undefined.
30

ERRORS

32       This routine can fail, returning 0, if a stat(2) of the supplied  path‐
33       name  or an open(2) of /dev/volctl fails, or if any of the following is
34       true:
35
36       ENXIO    Volume management is not running.
37
38
39       EINTR    An interrupt signal was detected while checking for  the  sup‐
40                plied pathname for use.
41
42

EXAMPLES

44       Example 1 Using volmgt_inuse()
45
46
47       To see if volume management is managing the first floppy disk:
48
49
50         if (volmgt_inuse("/dev/rdiskette0") != 0) {
51                 (void) printf("volmgt is managing diskette 0\n");
52         } else {
53                 (void) printf("volmgt is NOT managing diskette 0\n");
54         }
55
56

ATTRIBUTES

58       See attributes(5) for descriptions of the following attributes:
59
60
61
62
63       ┌─────────────────────────────┬─────────────────────────────┐
64       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
65       ├─────────────────────────────┼─────────────────────────────┤
66       │MT-Level                     │MT-Safe                      │
67       ├─────────────────────────────┼─────────────────────────────┤
68       │Interface Stability          │Obsolete                     │
69       └─────────────────────────────┴─────────────────────────────┘
70

SEE ALSO

72       open(2),   stat(2),   errno(3C),   volmgt_check(3VOLMGT),   volmgt_run‐
73       ning(3VOLMGT),  attributes(5),  hal(5)
74

NOTES

76       This routine requires volume management to be running.
77
78
79       Since volmgt_inuse() returns 0 for two different  cases  (both  when  a
80       volume  is  not in use, and when an error occurs), it is up to the user
81       to to check errno to differentiate the two, and to ensure  that  volume
82       management is running.
83
84
85
86SunOS 5.11                        8 Mar 2007             volmgt_inuse(3VOLMGT)
Impressum