*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> getfsent_r (3)              
Title
Content
Arch
Section
 

getfsent(3)

Contents


NAME    [Toc]    [Back]

       getfsent,  getfsent_r,  getfsspec, getfsspec_r, getfsfile,
       getfsfile_r, setfsent, setfsent_r, endfsent, endfsent_r  -
       Get information about a file system

SYNOPSIS    [Toc]    [Back]

       #include <fstab.h>

       struct fstab *getfsent(
               void ); struct fstab *getfsspec(
               const char *spec_file ); struct fstab *getfsfile(
               const char *fs_file ); int setfsent(
               void ); void endfsent(
               void );

       The following obsolete functions are supported in order to
       maintain backward compatibility with previous versions  of
       the  operating  system.  You  should  not  use them in new
       designs.  int getfsspec_r(
               const char *spec_file,
               struct fstab *fsent,
               char *buf,
               int len,
               FILE **fs_fp ); int getfsent_r(
               struct fstab *fsent,
               char *buf,
               int len,
               FILE **fs_fp ); int getfsfile_r(
               const char *fs_file,
               struct fstab *fsent,
               char *buf,
               int len,
               FILE **fs_fp ); int setfsent_r(
               FILE **fs_fp ); int endfsent_r(
               FILE **fs_fp );

LIBRARY    [Toc]    [Back]

       Standard C Library (libc)

PARAMETERS    [Toc]    [Back]

       Specifies the block  special  device  name  to  look  for.
       Specifies the file system filename to look for.  Specifies
       the file system table entry found.   Specifies  a  working
       buffer  that  can hold the longest fstab file line for the
       reentrant functions.  Specifies the length  of  buf.  This
       length  should  be  sufficient for buf to hold the longest
       /etc/fstab line.  Specifies the  file  that  contains  the
       next file system entry (initialized by the user).

DESCRIPTION    [Toc]    [Back]

       For  the  following  functions,  entries are read from the
       /etc/fstab file.

       The getfsent() function reads the next line of  the  file,
       opening the file if necessary.

       The  setfsent()  function opens the file or rewinds to the
       first record.

       The endfsent() function closes the file. If  there  is  no
       file to close, the endfsent() function returns.

       The  getfsspec()  function  sequentially searches from the
       beginning of the file until a matching spec_file  name  is
       found, or the end of the file is encountered.

       The  getfsfile()  function  sequentially searches from the
       beginning of the file until a matching file  system  filename
 is found, or the end of the file is encountered.

NOTES    [Toc]    [Back]

       The  getfsent(), getfsspec(), getfsfile(), setfsent(), and
       endfsent() functions store the information  in  a  threadspecific
  buffer. Subsequent calls to these functions from
       the same thread overwrite the  contents  of  the  internal
       buffer.

       The   getfsent_r(),  getfsspec_r(),  getfsfile_r(),  setfsent_r(),
 and endfsent_r() functions  are  obsolete  reentrant
  versions  of  the  getfsent(),  getfsspec(), getfsfile(),
 setfsent(), and  endfsent()  functions.  They  are
       supported in order to maintain backward compatibility with
       previous versions of the operating system and  should  not
       be  used  in new designs. Note that the caller is expected
       to initialize *fs_fp to  NULL  before  calling  the  setfsent_r()
 function for the first time.

RETURN VALUES    [Toc]    [Back]

       Upon successful completion, the getfsent() and getfsspec()
       functions return a pointer to a file system  table  entry,
       defined  in  the  fstab.h  file.  The  setfsent() function
       returns a value of 1.

       Upon failure or EOF (End-of-File), the getfsent(),  getfsfile(),
  and  getfsspec() functions return a NULL pointer,
       and the setfsent() function returns a value of 0 (zero).

       Upon  successful  completion,  the   getfsent_r(),   getfsspec_r(),
 and getfsfile_r() functions store the file system
 table structure in the area pointed at by fsent,  and,
       along with setfsent_r(), return a value of 0 (zero).

       Upon  failure,  the  getfsent_r(),  getfsspec_r(),  getfsfile_r(),
 and setfsent() functions return a value of -1.

ERRORS    [Toc]    [Back]

       If any of  the  following  conditions  occurs,  the  getfsent_r(),
  getfsspec_r(),  getfsfile_r(), and setfsent_r()
       functions set errno to  the  corresponding  value:  fsent,
       line, or fs_fp are invalid, or len is too small.

       If  any  of  the  following  conditions  occurs, the getfsent_r(),
 getfsspec_r(), and getfsfile_r(), functions  set
       errno to the corresponding value: The search failed.

       In  addition  upon  failure, the setfsent() and endfsent()
       functions return other errnos.

SEE ALSO    [Toc]    [Back]

      
      
       Files: fstab(4)



                                                      getfsent(3)
[ Back ]
 Similar pages
Name OS Title
sizer Tru64 Displays information about the system or kernel, or creates a system configuration file
dxsysinfo Tru64 Monitors system information such as CPU activity, memory, swap space, and file system usage
statvfs HP-UX get file system information
fstatvfs Tru64 Get file system information
statfs IRIX get file system information
statvfs IRIX get file system information
fstatvfs HP-UX get file system information
statvfs Tru64 Get file system information
sysfs IRIX get file system type information
dumpfs OpenBSD dump file system information
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service