Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

volmgt_root(3volmgt) [opensolaris man page]

volmgt_root(3VOLMGT)					Volume Management Library Functions				      volmgt_root(3VOLMGT)

NAME
volmgt_root - return the volume management root directory SYNOPSIS
cc [ flag ... ] file ... -lvolmgt [ library ... ] #include <volmgt.h> const char *volmgt_root(void); DESCRIPTION
This function is obsolete. The management of removable media by the Volume Management feature, including vold, has been replaced by soft- ware that supports the Hardware Abstraction Layer (HAL). Programmatic support for HAL is through the HAL APIs, which are documented on the HAL web site. See hal(5). The return value of this function is undefined. The volmgt_root() function returns the current volume management root directory, which by default is /vol but can be configured to be in a different location. RETURN VALUES
The return from this function is undefined. ERRORS
This function may fail if an open() of /dev/volctl fails. If this occurs a pointer to the default Volume Management root directory is returned. EXAMPLES
Example 1 Finding the Volume Management Root directory. To find out where the volume management root directory is: if ((path = volmgt_root()) != NULL) { (void) printf("Volume Management root dir=%s ", path); } else { (void) printf("can't find Volume Management root dir "); } FILES
/dev default location for the volume management root directory ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ |Interface Stability |Obsolete | +-----------------------------+-----------------------------+ SEE ALSO
cc(1B), open(2), volmgt_check(3VOLMGT), volmgt_inuse(3VOLMGT), volmgt_running(3VOLMGT), attributes(5), hal(5) NOTES
This function returns the default root directory location even when volume management is not running. SunOS 5.11 8 Mar 2007 volmgt_root(3VOLMGT)

Check Out this Related Man Page

media_getattr(3VOLMGT)					Volume Management Library Functions				    media_getattr(3VOLMGT)

NAME
media_getattr, media_setattr - get and set media attributes SYNOPSIS
cc [ flag ... ] file ... -lvolmgt [ library ... ] #include <volmgt.h> char *media_getattr(char *vol_path, char *attr); int media_setattr(char *vol_path, char *attr, char *value); DESCRIPTION
This function is obsolete. The management of removable media by the Volume Management feature, including vold, has been replaced by soft- ware that supports the Hardware Abstraction Layer (HAL). Programmatic support for HAL is through the HAL APIs, which are documented on the HAL web site. See hal(5). The return value of this function is undefined. media_setattr() and media_getattr() respectively set and get attribute-value pairs (called properties) on a per-volume basis. Volume management supports system properties and user properties. System properties are ones that volume management predefines. Some of these system properties are writable, but only by the user that owns the volume being specified, and some system properties are read only: Attribute Writable Value Description ------------------------------------------------------------------------------------------------------ s-access RO "seq", "rand" sequential or random access s-density RO "low", "medium", "high" media density s-parts RO comma separated list of slice numbers list of partitions on this volume s-location RO pathname volume management pathname to media s-mejectable RO "true", "false" whether or not media is manually ejectable s-rmoneject R/W "true", "false" should media access points be removed from database upon ejection s-enxio R/W "true", "false" if set return ENXIO when media access attempted Properties can also be defined by the user. In this case the value can be any string the user wishes. RETURN VALUES
The return from this function is undefined. ERRORS
Both media_getattr() and media_setattr() can fail returning a null pointer if an open(2) of the specified vol_path fails, if an fstat(2) of that pathname fails, or if that pathname is not a block or character special device. media_getattr() can also fail if the specified attribute was not found, and media_setattr() can also fail if the caller doesn't have per- mission to set the attribute, either because it's is a system attribute, or because the caller doesn't own the specified volume. EXAMPLES
Example 1 Using media_getattr() The following example checks to see if the volume called fred that volume management is managing can be ejected by means of software, or if it can only be manually ejected: if (media_getattr("/rdsk/fred", "s-mejectable") != NULL) { (void) printf(""fred" must be manually ejected "); } else { (void) printf("software can eject "fred" "); } This example shows setting the s-enxio property for the floppy volume currently in the first floppy drive: int res; if ((res = media_setattr("/dev/aliases/floppy0", "s-enxio", "true")) == 0) { (void) printf("can't set s-enxio flag for floppy0 "); } ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ |Interface Stability |Obsolete | +-----------------------------+-----------------------------+ SEE ALSO
cc(1B), lstat(2), open(2), readlink(2), stat(2), free(3C), malloc(3C), media_findname(3VOLMGT), volmgt_check(3VOLMGT), volmgt_inuse(3VOLMGT), volmgt_root(3VOLMGT), volmgt_running(3VOLMGT), volmgt_symname(3VOLMGT), attributes(5), hal(5) SunOS 5.11 8 Mar 2007 media_getattr(3VOLMGT)
Man Page

Featured Tech Videos