Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

getfsent(3x) [ultrix man page]

getfsent(3x)															      getfsent(3x)

Name
       getfsent, getfsspec, getfsfile, getfstype, setfsent, endfsent - get file system descriptor file entry

Syntax
       #include <fstab.h>
       #include /usr/include/sys/fs_types.h

       struct fstab *getfsent()

       struct fstab *getfsspec(spec)
       char *spec;

       struct fstab *getfsfile(file)
       char *file;

       struct fstab *getfstype(type)
       char *type;

       int setfsent()

       int endfsent()

Description
       All  routines  operate  on the file which contains descriptions of the known file systems.  The routine opens this file.  The routine reads
       the next file system description within opening the file if necessary.  The routine closes the file.

       The and routines sequentially scan the file for specific file system descriptions.  The routine searches for a description with a  matching
       special file name field.  The routine searches for a description with a matching file system path prefix field.	The routine searches for a
       description with a matching file system type field.

       The and each return a pointer to a representation of the description they have matched or read.	Representations are in the format  of  the
       following structure:
       #define	 FSTAB_RW  "rw" /* read-write device	  */
       #define	 FSTAB_RO  "ro" /* read-only device	  */
       #define	 FSTAB_RQ  "rq" /* read-write with quotas */
       #define	 FSTAB_SW  "sw" /* swap device		  */
       #define	 FSTAB_XX  "xx" /* ignore totally	  */

       struct fstab {
	    char *fs_spec; /* block special device name    */
	    char *fs_file; /* file system path prefix	   */
	    char *fs_type; /* rw,ro,sw or xx		   */
	    int  fs_freq;  /* dump frequency, in days	   */
	    int  fs_passno;	/* pass number on parallel dump */
	    char *fs_name; /* name of the file system type */
	    char *fs_opts  /* arbitrary options field	   */
       };

Return Values
       A NULL or 0 is returned, but errno is not set on detection of errors.

Restrictions
       All descriptions are contained in static areas, which should be copied.

Files
       /etc/fstab     File system information file.

See Also
       fstab(5)

																      getfsent(3x)

Check Out this Related Man Page

GETFSENT(3)						     Library Functions Manual						       GETFSENT(3)

NAME
getfsent, getfsspec, getfsfile, getfstype, setfsent, endfsent - get file system descriptor file entry SYNOPSIS
#include <fstab.h> struct fstab *getfsent() struct fstab *getfsspec(spec) char *spec; struct fstab *getfsfile(file) char *file; struct fstab *getfstype(type) char *type; int setfsent() int endfsent() DESCRIPTION
Getfsent, getfsspec, getfstype, and getfsfile each return a pointer to an object with the following structure containing the broken-out fields of a line in the file system description file, <fstab.h>. struct fstab { char *fs_spec; char *fs_file; char *fs_type; int fs_freq; int fs_passno; }; The fields have meanings described in fstab(5). Getfsent reads the next line of the file, opening the file if necessary. Setfsent opens and rewinds the file. Endfsent closes the file. Getfsspec and getfsfile sequentially search from the beginning of the file until a matching special file name or file system file name is found, or until EOF is encountered. Getfstype does likewise, matching on the file system type field. FILES
/etc/fstab SEE ALSO
fstab(5) DIAGNOSTICS
Null pointer (0) returned on EOF or error. BUGS
All information is contained in a static area so it must be copied if it is to be saved. 4th Berkeley Distribution May 12, 1986 GETFSENT(3)
Man Page