.\" Copyright (c) 1983 The Regents of the University of California. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms are permitted .\" provided that the above copyright notice and this paragraph are .\" duplicated in all such forms and that any documentation, .\" advertising materials, and other materials related to such .\" distribution and use acknowledge that the software was developed .\" by the University of California, Berkeley. The name of the .\" University may not be used to endorse or promote products derived .\" from this software without specific prior written permission. .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED .\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. .\" .\" @(#)getfsent.3 6.5 (Berkeley) 09/16/88 .\" .TH GETFSENT 3 "" .UC 4 .SH NAME getfsent, getfsspec, getfsfile, setfsent, endfsent \- get file system descriptor file entry .SH SYNOPSIS .nf .B #include .PP .B struct fstab *getfsent() .PP .B struct fstab *getfsspec(spec) .B char *spec; .PP .B struct fstab *getfsfile(file) .B char *file; .PP .B int setfsent() .PP .B void endfsent() .fi .SH DESCRIPTION .IR Getfsent , .IR getfsspec , and .I 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, .IR < fstab.h >. .RS .PP .nf struct fstab { char *fs_spec; char *fs_file; char *fs_type; int fs_freq; int fs_passno; }; .ft R .ad .fi .RE .PP The fields have meanings described in .IR fstab (5). .PP .I Getfsent reads the next line of the file, opening the file if necessary. .PP .I Setfsent opens the file, or rewinds it if it is already open. .PP .I Endfsent closes the file. .PP .I Getfsspec and .I 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. .PP Entries in the file with a type field equivalent to \fIFSTAB_XX\fP are ignored. .SH FILES /etc/fstab .SH "SEE ALSO" fstab(5) .SH DIAGNOSTICS .IR Getfsent , .IR getfsspec , and .I getfsfile return a null pointer (0) on EOF or error. .I Setfsent returns 0 on success, 1 on failure. .I Endfsent returns nothing. .SH BUGS All information is contained in a static area so it must be copied if it is to be saved.