endfsent(3)


NAME

   getfsent,  getfsspec,  getfsfile,  setfsent,  endfsent  -  handle fstab
   entries

SYNOPSIS

   #include <fstab.h>

   void endfsent(void);

   struct fstab *getfsent(void);

   struct fstab *getfsfile(const char *mount_point);

   struct fstab *getfsspec(const char *special_file);

   int setfsent(void);

DESCRIPTION

   These functions read from the file /etc/fstab.   The  struct  fstab  is
   defined by:

       struct fstab {
           char       *fs_spec;       /* block device name */
           char       *fs_file;       /* mount point */
           char       *fs_vfstype;    /* file-system type */
           char       *fs_mntops;     /* mount options */
           const char *fs_type;       /* rw/rq/ro/sw/xx option */
           int         fs_freq;       /* dump frequency, in days */
           int         fs_passno;     /* pass number on parallel dump */
       };

   Here  the  field  fs_type  contains  (on a *BSD system) one of the five
   strings "rw", "rq",  "ro",  "sw",  "xx"  (read-write,  read-write  with
   quota, read-only, swap, ignore).

   The  function  setfsent() opens the file when required and positions it
   at the first line.

   The function getfsent() parses the next line  from  the  file.   (After
   opening it when required.)

   The function endfsent() closes the file when required.

   The  function  getfsspec() searches the file from the start and returns
   the  first  entry  found  for  which  the  fs_spec  field  matches  the
   special_file argument.

   The  function  getfsfile() searches the file from the start and returns
   the  first  entry  found  for  which  the  fs_file  field  matches  the
   mount_point argument.

RETURN VALUE

   Upon  success,  the  functions getfsent(), getfsfile(), and getfsspec()
   return a pointer to a struct fstab, while setfsent() returns  1.   Upon
   failure   or   end-of-file,   these   functions   return  NULL  and  0,
   respectively.

ATTRIBUTES

   For  an  explanation  of  the  terms  used   in   this   section,   see
   attributes(7).

   
   Interface     Attribute      Value                       
   
   endfsent(),   Thread safety  MT-Unsafe race:fsent        
   setfsent()                                               
   
   getfsent(),   Thread safety  MT-Unsafe race:fsent locale 
   getfsspec(),                                             
   getfsfile()                                              
   

CONFORMING TO

   These  functions  are  not  in POSIX.1.  Several operating systems have
   them, for example, *BSD, SunOS, Digital UNIX, AIX  (which  also  has  a
   getfstype()).   HP-UX has functions of the same names, that however use
   a struct checklist instead of a struct fstab, and calls these functions
   obsolete, superseded by getmntent(3).

NOTES

   These functions are not thread-safe.

   Since  Linux  allows mounting a block special device in several places,
   and since several devices can have the same mount point, where the last
   device  with  a  given  mount  point  is  the  interesting  one,  while
   getfsfile() and getfsspec() only return the first occurrence, these two
   functions are not suitable for use under Linux.

SEE ALSO

   getmntent(3), fstab(5)

COLOPHON

   This  page  is  part of release 4.09 of the Linux man-pages project.  A
   description of the project, information about reporting bugs,  and  the
   latest     version     of     this    page,    can    be    found    at
   https://www.kernel.org/doc/man-pages/.


More Linux Commands

manpages/DBI::Gofer::Serializer::DataDumper.3pm.html
DBI::Gofer::Serializer::DataDumper(3pm) - Gofer serializatio
Uses DataDumper to serialize. Deserialization is not supported. The output of this class is only meant for human consumption. See also DBI::Gofer::Serializer::B

manpages/re.3pm.html
re(3pm) - Perl pragma to alter regular expression behaviour
taint mode When use re taint is in effect, and a tainted string is the target of a regexp, the regexp memories (or values returned by the m// operator in list c

manpages/parray.n.html
parray(n) - standard library of Tcl procedures (Man Page)...
Tcl includes a library of Tcl procedures for commonly-needed functions. The procedures defined in the Tcl library are generic ones suitable for use by many diff

manpages/glGenTextures.3gl.html
glGenTextures(3gl) - generate texture names - Linux man page
glGenTextures returns n texture names in textures. There is no guarantee that the names form a contiguous set of integers; however, it is guaranteed that none o

manpages/gcov.1.html
gcov(1) - coverage testing tool (Commands - Linux man page)
gcov is a test coverage program. Use it in concert with GCC to analyze your programs to help create more efficient, faster running code and to discover untested

manpages/gnutls_dh_params_deinit.3.html
gnutls_dh_params_deinit(3) - API function - Linux man page
This function will deinitialize the DH parameters structure. REPORTING BUGS Report bugs to &lt;bug-gnutls@gnu.org&gt;. GnuTLS home page: http://www.gnu.org/software/g

manpages/ceilf.3.html
ceilf(3) - ceiling function: smallest integral value not les
These functions return the smallest integral value that is not less than x. For example, ceil(0.5) is 1.0, and ceil(-0.5) is 0.0. RETURN VALUE These functions r

manpages/XF86MiscQueryVersion.3.html
XF86MiscQueryVersion(3) - Extension library for the XFree86-
These functions provide an interface to the XFree86-Misc extension which allows various server settings to be queried and changed dynamically. Applications that

manpages/xdmxconfig.1.html
xdmxconfig(1) - a graphical configuration tool for Xdmx conf
xdmxconfig reads, edits, and writes configuration files for the Xdmx server. The grammar for the configuration file is specified in the Xdmx(1) manual page. To

manpages/regerror.3.html
regerror(3) - POSIX regex functions - Linux manual page.....
POSIX regex compiling regcomp() is used to compile a regular expression into a form that is suitable for subsequent regexec() searches. regcomp() is supplied wi

manpages/getyx.3ncurses.html
getyx(3ncurses) - get curses cursor and window coordinates
The getyx macro places the current cursor position of the given window in the two integer variables y and x. If win is a subwindow, the getparyx macro places th

manpages/print.3ncurses.html
print(3ncurses) - ship binary data to printer (Man Page)....
print.3ncurses - This function uses the mc5p or mc4 and mc5 capabilities, if they are present, to ship given data to a printer attached to the terminal. Note th





We can't live, work or learn in freedom unless the software we use is free.