HP-UX Reference (11i v2 04/09) - 3 Library Functions A-M (vol 6)

g
getmntent(3X) getmntent(3X)
hasmntopt() Scans the mnt_opts field of the
mntent structure mnt for a substring that
matches opt. It returns the address of the substring if a match is found. Otherwise,
the return value takes one of the following default behaviors :
Option String Corresponding Default Behavior
MNTOPT_RW If the mnt_opts does not have the
MNTOPT_RO option,
MNTOPT_RW is returned. Otherwise, NULL is returned.
MNTOPT_SUID If the mnt_opts does not have the
MNTOPT_NOSUID
option, MNTOPT_SUID is returned. Otherwise, NULL is
returned.
MNTOPT_NOQUOTA
If the mnt_opts does not have the MNTOPT_QUOTA
option, MNTOPT_NOQUTOA
is returned. Otherwise, NULL
is returned.
MNTOPT_FG If the mnt_opts does not have the
MNTOPT_BG option and
mnt_type is MNTTYPE_NFS, MNTOPT_FG is returned.
Otherwise, NULL is returned.
MNTOPT_HARD If the mnt_opts does not have the
MNTOPT_SOFT option
and
mnt_type is MNTTYPE_NFS, MNTOPT_HARD is
returned. Otherwise, NULL is returned.
MNTOPT_INTR If the mnt_opts does not have the MNTOPT_NOINTR
option and mnt_type is MNTTYPE_NFS, MNTOPT_INTR
is returned. Otherwise, NULL is returned.
MNTOPT_DEVS If the mnt_opts does not have the MNTOPT_NODEVS
option and mnt_type is MNTTYPE_NFS, MNTOPT_DEVS
is returned. Otherwise, NULL is returned.
If none of the default behaviors occur, NULL is returned.
Note: When the return value is the result of one of the default behaviors ,itisa
pseudo option string, and not a pointer in the
mnt_ops field.
endmntent() Closes the file.
The following definitions are provided in
<mntent.h>:
#define MNT_CHECKLIST "/etc/fstab"
#define MNT_MNTTAB "/etc/mnttab"
#define MNTMAXSTR 128 /* Max size string in mntent */
#define MNTTYPE_HFS "hfs" /* HFS file system */
#define MNTTYPE_CDFS "cdfs" /* CD-ROM file system */
#define MNTTYPE_NFS "nfs" /* Network file system */
#define MNTTYPE_SWAP "swap" /* Swap device */
#define MNTTYPE_SWAPFS "swapfs" /* File system swap */
#define MNTTYPE_IGNORE "ignore" /* Ignore this entry */
#define MNTOPT_DEFAULTS "defaults" /* Use all default options */
#define MNTOPT_RO "ro" /* Read only */
#define MNTOPT_RW "rw" /* Read/write */
#define MNTOPT_SUID "suid" /* Set uid allowed */
#define MNTOPT_NOSUID "nosuid" /* No set uid allowed */
#define MNTOPT_QUOTA "quota" /* Enable disk quotas */
#define MNTOPT_NOQUOTA "noquota" /* Disable disk quotas */
#define MNTOPT_DEV "dev" /* Device ID of the filesystem mounted */
The following definition is provided for device swap in <mntent.h>:
#define MNTOPT_END "end" /* swap after end of file system,
Series 300/400/700 only */
The following definitions are provided for file system swap in <mntent.h>:
HP-UX 11i Version 2: September 2004 2 Hewlett-Packard Company Section 3395