Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

fstab(5)

GETFSENT(3)  —  C LIBRARY FUNCTIONS

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

These routines are included for compatibility with 4.2 BSD; they have been superseded by the getmntent(3) library routines. 

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;
intfs_freq;
intfs_passno;
};

The fields have meanings described in fstab(5). 

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

getfsent() 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

The return value points to static information which is overwritten in each call. 

Solbourne Computer, Inc.  —  6 October 1987

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026