DELMNTENT(3)                                                      DELMNTENT(3)


NAME
     delmntent - remove entry from mounted filesystem description file

SYNOPSIS
     #include <mntent.h>

     int delmntent(char *filep, struct mntent *mnt);

DESCRIPTION
     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.

FILES
     /etc/mtab

SEE ALSO
     getmntent(3), fstab(4)


                                                                        Page 1