11539Srgrimes/*
21539Srgrimes * Copyright (c) 1980, 1993
31539Srgrimes *	The Regents of the University of California.  All rights reserved.
41539Srgrimes *
51539Srgrimes * Redistribution and use in source and binary forms, with or without
61539Srgrimes * modification, are permitted provided that the following conditions
71539Srgrimes * are met:
81539Srgrimes * 1. Redistributions of source code must retain the above copyright
91539Srgrimes *    notice, this list of conditions and the following disclaimer.
101539Srgrimes * 2. Redistributions in binary form must reproduce the above copyright
111539Srgrimes *    notice, this list of conditions and the following disclaimer in the
121539Srgrimes *    documentation and/or other materials provided with the distribution.
13203964Simp * 3. Neither the name of the University nor the names of its contributors
141539Srgrimes *    may be used to endorse or promote products derived from this software
151539Srgrimes *    without specific prior written permission.
161539Srgrimes *
171539Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
181539Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
191539Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
201539Srgrimes * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
211539Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
221539Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
231539Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
241539Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
251539Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
261539Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
271539Srgrimes * SUCH DAMAGE.
281539Srgrimes *
291539Srgrimes *	@(#)fstab.h	8.1 (Berkeley) 6/2/93
3093032Simp * $FreeBSD$
311539Srgrimes */
321539Srgrimes
331539Srgrimes#ifndef _FSTAB_H_
341539Srgrimes#define _FSTAB_H_
351539Srgrimes
361539Srgrimes/*
371539Srgrimes * File system table, see fstab(5).
381539Srgrimes *
391539Srgrimes * Used by dump, mount, umount, swapon, fsck, df, ...
401539Srgrimes *
411539Srgrimes * For ufs fs_spec field is the block special name.  Programs that want to
421539Srgrimes * use the character special name must create that name by prepending a 'r'
431539Srgrimes * after the right most slash.  Quota files are always named "quotas", so
441539Srgrimes * if type is "rq", then use concatenation of fs_file and "quotas" to locate
451539Srgrimes * quota file.
461539Srgrimes */
471539Srgrimes#define	_PATH_FSTAB	"/etc/fstab"
481539Srgrimes#define	FSTAB		"/etc/fstab"	/* deprecated */
491539Srgrimes
501539Srgrimes#define	FSTAB_RW	"rw"		/* read/write device */
511539Srgrimes#define	FSTAB_RQ	"rq"		/* read/write with quotas */
521539Srgrimes#define	FSTAB_RO	"ro"		/* read-only device */
531539Srgrimes#define	FSTAB_SW	"sw"		/* swap device */
541539Srgrimes#define	FSTAB_XX	"xx"		/* ignore totally */
551539Srgrimes
561539Srgrimesstruct fstab {
571539Srgrimes	char	*fs_spec;		/* block special device name */
581539Srgrimes	char	*fs_file;		/* file system path prefix */
591539Srgrimes	char	*fs_vfstype;		/* File system type, ufs, nfs */
601539Srgrimes	char	*fs_mntops;		/* Mount options ala -o */
611539Srgrimes	char	*fs_type;		/* FSTAB_* from fs_mntops */
621539Srgrimes	int	fs_freq;		/* dump frequency, in days */
6322051Smpp	int	fs_passno;		/* pass number on parallel fsck */
641539Srgrimes};
651539Srgrimes
661539Srgrimes#include <sys/cdefs.h>
671539Srgrimes
681539Srgrimes__BEGIN_DECLS
6993032Simpstruct fstab *getfsent(void);
7093032Simpstruct fstab *getfsspec(const char *);
7193032Simpstruct fstab *getfsfile(const char *);
7293032Simpint setfsent(void);
7393032Simpvoid endfsent(void);
74113219Smdoddvoid setfstab(const char *);
75113219Smdoddconst char *getfstab(void);
761539Srgrimes__END_DECLS
771539Srgrimes
781539Srgrimes#endif /* !_FSTAB_H_ */
79