xref: /original-bsd/include/fstab.h (revision 3588a932)
1 /*
2  * Copyright (c) 1980 Regents of the University of California.
3  * All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  *
7  *	@(#)fstab.h	5.11 (Berkeley) 02/05/91
8  */
9 
10 /*
11  * File system table, see fstab(5).
12  *
13  * Used by dump, mount, umount, swapon, fsck, df, ...
14  *
15  * For ufs fs_spec field is the block special name.  Programs that want to
16  * use the character special name must create that name by prepending a 'r'
17  * after the right most slash.  Quota files are always named "quotas", so
18  * if type is "rq", then use concatenation of fs_file and "quotas" to locate
19  * quota file.
20  */
21 #define	_PATH_FSTAB	"/etc/fstab"
22 #define	FSTAB		"/etc/fstab"	/* deprecated */
23 
24 #define	FSTAB_RW	"rw"		/* read/write device */
25 #define	FSTAB_RQ	"rq"		/* read/write with quotas */
26 #define	FSTAB_RO	"ro"		/* read-only device */
27 #define	FSTAB_SW	"sw"		/* swap device */
28 #define	FSTAB_XX	"xx"		/* ignore totally */
29 
30 struct fstab {
31 	char	*fs_spec;		/* block special device name */
32 	char	*fs_file;		/* file system path prefix */
33 	char	*fs_vfstype;		/* File system type, ufs, nfs */
34 	char	*fs_mntops;		/* Mount options ala -o */
35 	char	*fs_type;		/* FSTAB_* from fs_mntops */
36 	int	fs_freq;		/* dump frequency, in days */
37 	int	fs_passno;		/* pass number on parallel dump */
38 };
39 
40 #include <sys/cdefs.h>
41 
42 __BEGIN_DECLS
43 struct fstab *getfsent __P((void));
44 struct fstab *getfsspec __P((const char *));
45 struct fstab *getfsfile __P((const char *));
46 int setfsent __P((void));
47 void endfsent __P((void));
48 __END_DECLS
49