Returns information about the mount status of the system.
#include <sys/mntctl.h> #include <sys/vmount.h> int mntctl (Command, Size, Buffer) int Command; int Size; char *Buffer;
The mntctl subroutine is used to query the status of virtual file systems (also known as mounted file systems).
Each virtual file system (VFS) is described by a vmount structure. This structure is supplied when the VFS is created by the vmount subroutine. The vmount structure is defined in the sys/vmount.h file.
If the mntctl subroutine is successful, the number of vmount structures copied into the Buffer parameter is returned. If the Size parameter indicates the supplied buffer is too small to hold the vmount structures for all the current VFSs, the mntctl subroutine sets the first word of the Buffer parameter to the required size (in bytes) and returns the value 0. If the mntctl subroutine otherwise fails, a value of -1 is returned, and the errno global variable is set to indicate the error.
The mntctl subroutine fails and the requested operation is not performed if one or both of the following are true:
EINVAL | The Command parameter is not MCTL_QUERY, or the Size parameter is not a positive value. |
EFAULT | The Buffer parameter points to a location outside of the allocated address space of the process. |
This subroutine is part of Base Operating System (BOS) Runtime.
The uvmount or umount subroutine, vmount or mount subroutine.
Files, Directories, and File Systems for Programmers in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.