fstab.h revision 93032
1139749Simp/*
226159Sse * Copyright (c) 1980, 1993
369953Smsmith *	The Regents of the University of California.  All rights reserved.
469953Smsmith *
526159Sse * Redistribution and use in source and binary forms, with or without
626159Sse * modification, are permitted provided that the following conditions
726159Sse * are met:
826159Sse * 1. Redistributions of source code must retain the above copyright
926159Sse *    notice, this list of conditions and the following disclaimer.
1026159Sse * 2. Redistributions in binary form must reproduce the above copyright
1126159Sse *    notice, this list of conditions and the following disclaimer in the
1226159Sse *    documentation and/or other materials provided with the distribution.
1326159Sse * 3. All advertising materials mentioning features or use of this software
1426159Sse *    must display the following acknowledgement:
1526159Sse *	This product includes software developed by the University of
1626159Sse *	California, Berkeley and its contributors.
1726159Sse * 4. Neither the name of the University nor the names of its contributors
1826159Sse *    may be used to endorse or promote products derived from this software
1926159Sse *    without specific prior written permission.
2026159Sse *
2126159Sse * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2226159Sse * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2326159Sse * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2426159Sse * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2526159Sse * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2626159Sse * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2726159Sse * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
282432Sse * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29131288Ssos * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30131288Ssos * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31131288Ssos * SUCH DAMAGE.
3245720Speter *
3345720Speter *	@(#)fstab.h	8.1 (Berkeley) 6/2/93
342753Swollman * $FreeBSD: head/include/fstab.h 93032 2002-03-23 17:24:55Z imp $
352753Swollman */
363533Sse
3746023Speter#ifndef _FSTAB_H_
38295131Sjhb#define _FSTAB_H_
3969783Smsmith
4026159Sse/*
4126159Sse * File system table, see fstab(5).
426132Sdg *
4339231Sgibbs * Used by dump, mount, umount, swapon, fsck, df, ...
44100702Simp *
45163163Sjmg * For ufs fs_spec field is the block special name.  Programs that want to
462432Sse * use the character special name must create that name by prepending a 'r'
472432Sse * after the right most slash.  Quota files are always named "quotas", so
4812662Sdg * if type is "rq", then use concatenation of fs_file and "quotas" to locate
4939231Sgibbs * quota file.
502432Sse */
5145720Speter#define	_PATH_FSTAB	"/etc/fstab"
5245720Speter#define	FSTAB		"/etc/fstab"	/* deprecated */
5345720Speter
5445720Speter#define	FSTAB_RW	"rw"		/* read/write device */
55193306Sjhb#define	FSTAB_RQ	"rq"		/* read/write with quotas */
5645720Speter#define	FSTAB_RO	"ro"		/* read-only device */
57208149Snwhitehorn#define	FSTAB_SW	"sw"		/* swap device */
58165131Sjhb#define	FSTAB_XX	"xx"		/* ignore totally */
59165131Sjhb
60165131Sjhbstruct fstab {
6161047Speter	char	*fs_spec;		/* block special device name */
6291355Simp	char	*fs_file;		/* file system path prefix */
6391355Simp	char	*fs_vfstype;		/* File system type, ufs, nfs */
6491355Simp	char	*fs_mntops;		/* Mount options ala -o */
657233Sse	char	*fs_type;		/* FSTAB_* from fs_mntops */
66224269Shselasky	int	fs_freq;		/* dump frequency, in days */
67198151Sthompsa	int	fs_passno;		/* pass number on parallel fsck */
68198151Sthompsa};
69198151Sthompsa
70198151Sthompsa#include <sys/cdefs.h>
7165176Sdfr
7269953Smsmith__BEGIN_DECLS
7365176Sdfrstruct fstab *getfsent(void);
74220195Sjhbstruct fstab *getfsspec(const char *);
75220195Sjhbstruct fstab *getfsfile(const char *);
76220195Sjhbint setfsent(void);
77220195Sjhbvoid endfsent(void);
78253120Smarius__END_DECLS
79189401Sjhb
80189401Sjhb#endif /* !_FSTAB_H_ */
81189401Sjhb