Manual Pages for UNIX Darwin command on man getfstype
MyWebUniversity

Manual Pages for UNIX Darwin command on man getfstype

GETFSENT(3) BSD Library Functions Manual GETFSENT(3)

NAME

ggeettffsseenntt, ggeettffssssppeecc, ggeettffssffiillee, sseettffsseenntt, eennddffsseenntt - get file system

descriptor file entry LLIIBBRRAARRYY

Standard C Library (libc, -lc)

SYNOPSIS

##iinncclluuddee <>

struct fstab * ggeettffsseenntt(void); struct fstab * ggeettffssssppeecc(const char *spec); struct fstab * ggeettffssffiillee(const char *file); int sseettffsseenntt(void); void eennddffsseenntt(void);

DESCRIPTION

The ggeettffsseenntt(), ggeettffssssppeecc(), and ggeettffssffiillee() 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, . struct fstab { char *fsspec; /* block special device name */ char *fsfile; /* file system path prefix */ char *fsvfstype; /* File system type, ufs, nfs */

char *fsmntops; /* Mount options ala -o */

char *fstype; /* FSTAB* from fsmntops */ int fsfreq; /* dump frequency, in days */ int fspassno; /* pass number on parallel fsck */ }; The fields have meanings described in fstab(5). The sseettffsseenntt() function opens the file (closing any previously opened file) or rewinds it if it is already open. The eennddffsseenntt() function closes the file. The ggeettffssssppeecc() and ggeettffssffiillee() functions search the entire file (opening it if necessary) for a matching special file name or file system file name. For programs wishing to read the entire database, ggeettffsseenntt() reads the next entry (opening the file if necessary). All entries in the file with a type field equivalent to FSTABXX are ignored.

RETURN VALUES

The ggeettffsseenntt(), ggeettffssssppeecc(), and ggeettffssffiillee() functions return a NULL pointer on EOF or error. The sseettffsseenntt() function returns 0 on failure, 1 on success. The eennddffsseenntt() function returns nothing. FILES /etc/fstab

SEE ALSO

fstab(5) HISTORY The ggeettffsseenntt() function appeared in 4.0BSD; the eennddffsseenntt(), ggeettffssffiillee(), ggeettffssssppeecc(), and sseettffsseenntt() functions appeared in 4.3BSD.

BUGS

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




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™