xref: /original-bsd/include/fstab.h (revision a9a02843)
1 /*
2  * Copyright (c) 1980 Regents of the University of California.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms are permitted
6  * provided that the above copyright notice and this paragraph are
7  * duplicated in all such forms and that any documentation,
8  * advertising materials, and other materials related to such
9  * distribution and use acknowledge that the software was developed
10  * by the University of California, Berkeley.  The name of the
11  * University may not be used to endorse or promote products derived
12  * from this software without specific prior written permission.
13  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16  *
17  *	@(#)fstab.h	5.6 (Berkeley) 07/15/89
18  */
19 
20 /*
21  * File system table, see fstab(5).
22  *
23  * Used by dump, mount, umount, swapon, fsck, df, ...
24  *
25  * The fs_spec field is the block special name.  Programs that want to use
26  * the character special name must create that name by prepending a 'r'
27  * after the right most slash.  Quota files are always named "quotas", so
28  * if type is "rq", then use concatenation of fs_file and "quotas" to locate
29  * quota file.
30  */
31 #define	_PATH_FSTAB	"/etc/fstab"
32 #define	FSTAB		"/etc/fstab"	/* deprecated */
33 
34 #define	FSTAB_RW	"rw"		/* read/write device */
35 #define	FSTAB_RQ	"rq"		/* read/write with quotas */
36 #define	FSTAB_RO	"ro"		/* read-only device */
37 #define	FSTAB_SW	"sw"		/* swap device */
38 #define	FSTAB_XX	"xx"		/* ignore totally */
39 
40 struct fstab {
41 	char	*fs_spec;		/* block special device name */
42 	char	*fs_file;		/* file system path prefix */
43 	char	*fs_type;		/* FSTAB_* */
44 	int	fs_freq;		/* dump frequency, in days */
45 	int	fs_passno;		/* pass number on parallel dump */
46 	char	*fs_vfstype;		/* File system type, ufs, nfs */
47 	char	*fs_mntops;		/* Mount options ala -o */
48 };
49 
50 struct	fstab *getfsent();
51 struct	fstab *getfsspec();
52 struct	fstab *getfsfile();
53 int	setfsent();
54 void	endfsent();
55