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