Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > G

getfsent(3X)

TO BE OBSOLETED
HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

getfsent(), getfsspec(), getfsfile(), getfstype(), setfsent(), endfsent() — get file system descriptor file entry

SYNOPSIS

#include <checklist.h>

struct checklist *getfsent(void);

struct checklist *getfsspec(const char *spec);

struct checklist *getfsfile(const char *file);

struct checklist *getfstype(const char *type);

int setfsent(void);

int endfsent(void);

Remarks:

These routines are included only for compatibility with 4.2 BSD. For maximum portability and improved functionality, new applications should use the getmntent(3X) library routines.

DESCRIPTION

getfsent(), getfsspec(), getfsfile(), and getfstype() each returns a pointer to an object with the following structure containing the broken-out fields of a line in the /etc/fstab file. The structure is declared in the <checklist.h> header file:

struct checklist { char *fs_spec; /* special file name */ char *fs_bspec; /* block special file name */ char *fs_dir; /* file sys directory name */ char *fs_type; /* type: ro, rw, sw, xx */ int fs_passno; /* fsck pass number */ int fs_freq; /* backup frequency */ };

The fields have meanings described in fstab(4). If the block special file name, the file system directory name, and the type are not all defined on the associated line in /etc/fstab, these routines return pointers to NULL in the fs_bspec, fs_dir, and fs_type fields. If the pass number or the backup frequency field are not present on the line, these routines return -1 in the corresponding structure member. fs_freq is reserved for future use.

getfsent()

Reads the next line of the file, opening the file if necessary.

setfsent()

Opens and rewinds the file.

endfsent()

Closes the file.

getfsspec()

Sequentially searches from beginning of file until a matching special file name is found, or until EOF is encountered.

getfsfile()

Sequentially searches from the beginning of the file until a matching file system file name is found, or until EOF is encountered. getfstype() Sequentially searches from the beginning of the file until a matching file system type field is found, or until EOF is encountered.

DIAGNOSTICS

A null pointer is returned on EOF, invalid entry, or error.

WARNINGS

Since all information is contained in a static area, it must be copied to be saved.

Obsolescent Interfaces

getfsent(), getfsspec(), getfsfile(), getfstype(), setfsent(), and endfsent() are to be obsoleted at a future date.

AUTHOR

getfsent() was developed by HP and the University of California, Berkeley.

FILES

/etc/fstab

SEE ALSO

fstab(4).

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.