icon Top 9 categories map      RocketAware > man pages >


Tips: Browse or Search all pages for efficient awareness of more than 6000 of the most popular reusable and open source applications, functions, libraries, and FAQs.

The "RKT couplings" below include links to source code, updates, additional information, advice, FAQs, and overviews.


Search all pages


By activity
Professions, Sciences, Humanities, Business, ...

User Interface
Text-based, GUI, Audio, Video, Keyboards, Mouse, Images,...

Text Strings
Conversions, tests, processing, manipulation,...

Integer, Floating point, Matrix, Statistics, Boolean, ...

Algorithms, Memory, Process control, Debugging, ...

Stored Data
Data storage, Integrity, Encryption, Compression, ...

Networks, protocols, Interprocess, Remote, Client Server, ...

Hard World
Timing, Calendar and Clock, Audio, Video, Printer, Controls...

File System
Management, Filtering, File & Directory access, Viewers, ...


RocketLink!--> Man page versions: OpenBSD FreeBSD Others

GETFSENT(3)               OpenBSD Programmer's Manual              GETFSENT(3)

     getfsent, getfsspec, getfsfile, setfsent, endfsent - get file system de-
     scriptor file entry

     #include <fstab.h>

     struct fstab *

     struct fstab *
     getfsspec(const char *spec);

     struct fstab *
     getfsfile(const char *file);



     The getfsent(), getfsspec(), and getfsfile() functions 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;       /* block special device name */
                   char    *fs_file;       /* file system path prefix */
                   char    *fs_vfstype;    /* type of file system */
                   char    *fs_mntops;     /* comma separated mount options */
                   char    *fs_type;       /* rw, ro, sw, or xx */
                   int     fs_freq;        /* dump frequency, in days */
                   int     fs_passno;      /* pass number on parallel dump */

     The fields have meanings described in fstab(5).

     setfsent() opens the file (closing any previously opened file) or rewinds
     it if it is already open.

     endfsent() closes the file.

     The getfsspec() and getfsfile() functions search the entire file (opening
     it if necessary) for a matching special file name or file system file

     For programs wishing to read the entire database, getfsent() reads the
     next entry (opening the file if necessary).

     All entries in the file with a type field equivalent to FSTAB_XX are ig-

     The getfsent(), getfsspec(), and getfsfile() functions return a null
     pointer on EOF or error.  The setfsent() function returns 0 on failure or
     1 on success.  The endfsent() function returns nothing.

     /etc/fstab  file system table


     The getfsent() function appeared in 4.0BSD; the endfsent(), getfsfile(),
     getfsspec(), and setfsent() functions appeared in 4.3BSD.

     These functions use static data storage; if the data is needed for future
     use, it should be copied before any subsequent calls overwrite it.

OpenBSD 2.6                      June 4, 1993                                2

Source: OpenBSD 2.6 man pages. Copyright: Portions are copyrighted by BERKELEY
SOFTWARE DESIGN, INC., The Regents of the University of California, Massachusetts
Institute of Technology, Free Software Foundation, FreeBSD Inc., and others.

(Corrections, notes, and links courtesy of RocketAware.com)

[Detailed Topics]
FreeBSD Sources for getfsent(3) functions
OpenBSD sources for getfsent(3)

[Overview Topics]

Up to: File Information - Obtaining file information (status, configuration, et al)
Up to: File System Information - Obtaining information of the filesystem as a whole. Status of disk subsystems, capacity, etc.

RocketLink!--> Man page versions: OpenBSD FreeBSD Others

Rapid-Links: Search | About | Comments | Submit Path: RocketAware > man pages > getfsent.3/
RocketAware.com is a service of Mib Software
Copyright 1999, Forrest J. Cavalier III. All Rights Reserved.
We welcome submissions and comments