DELMNTENT(3) DELMNTENT(3)
delmntent - remove entry from mounted filesystem description file
#include <mntent.h>
int delmntent(char *filep, struct mntent *mnt);
This routine removes entries from the mounted file system description
file /etc/mtab. The filep argument is the description file, usually
/etc/mtab. The mnt argument is a pointer to an object with the following
structure containing the broken-out fields of a line in the filesystem
description file, <mntent.h>. The fields have meanings described in
fstab(4).
struct mntent {
char *mnt_fsname; /* file system name */
char *mnt_dir; /* file system path prefix */
char *mnt_type; /* dbg, efs, nfs */
char *mnt_opts; /* ro, hide, etc. */
int mnt_freq; /* dump frequency, in days */
int mnt_passno; /* pass number on parallel fsck */
};
Any combination of the fields mnt_fsname, mnt_dir, mnt_type, and mnt_opts
may be specified in mnt to describe the entry to be removed. If a field
is non-NULL, the value given must match exactly to select this entry for
removal. Only the first entry which matches all non-NULL fields is
removed. The return value is 1 if an entry is removed, 0 if no match is
found, and -1 if an error occurs.
/etc/mtab
getmntent(3), fstab(4)
PPPPaaaaggggeeee 1111 [ Back ]
|