Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

getfsent(3)  —  Subroutines

OSF

NAME

getfsent, getfsspec, getfsfile, getfstype, setfsent, endfsent − Gets information about a file system

LIBRARY

Standard C Library (libc.a)

SYNOPSIS

#include <fstab.h>

struct fstab ∗getfsent( void );

struct fstab ∗getfsspec (
char ∗spec_file );

struct fstab ∗getfsfile(
char ∗fs_file );

struct fstab ∗getfstype(
char ∗fs_type );

void setfsent( void );

void endfsent( void );

PARAMETERS

spec_fileSpecifies the special filename. 

fs_fileSpecifies the file system filename. 

fs_typeSpecifies the file system type. 

DESCRIPTION

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

The setfsent() function opens the file and positions to the first record. 

The endfsent() function closes the file. 

The getfsspec() function sequentially searches from the beginning of the file until a matching special filename is found, or until 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 until the end of the file is encountered. 

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

NOTES

All information is contained in a static area, so it must be copied if it is to be saved. 

RETURN VALUES

Upon successful completion, the getfsent(), getfsspec(), getfstype(), and getsfile() functions return a pointer to a structure that contains information about a file system, defined in the fstab.h file.  A pointer to null is returned on EOF (End-of-File) or error. 

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