xref: /titanic_41/usr/src/lib/libbc/inc/include/mntent.h (revision 8eea8e29cc4374d1ee24c25a07f45af132db3499)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 1989 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #pragma ident	"%Z%%M%	%I%	%E% SMI"
28 
29 /*
30  * File system table, see mntent (5)
31  *
32  * Used by dump, mount, umount, swapon, fsck, df, ...
33  *
34  * Quota files are always named "quotas", so if type is "rq",
35  * then use concatenation of mnt_dir and "quotas" to locate
36  * quota file.
37  */
38 
39 #ifndef _mntent_h
40 #define _mntent_h
41 
42 #define	MNTTAB		"/etc/fstab"
43 #define	MOUNTED		"/etc/mtab"
44 
45 #define	MNTMAXSTR	128
46 
47 #define	MNTTYPE_42	"4.2"	/* 4.2 file system */
48 #define	MNTTYPE_NFS	"nfs"	/* network file system */
49 #define	MNTTYPE_PC	"pc"	/* IBM PC (MSDOS) file system */
50 #define	MNTTYPE_SWAP	"swap"	/* swap file system */
51 #define	MNTTYPE_IGNORE	"ignore"/* No type specified, ignore this entry */
52 #define MNTTYPE_LO	"lo"	/* Loop back File system */
53 
54 /*  mount options  */
55 #define	MNTOPT_RO	"ro"	/* read only */
56 #define	MNTOPT_RW	"rw"	/* read/write */
57 #define MNTOPT_GRPID 	"grpid"	/* SysV-compatible group-id on create */
58 #define MNTOPT_REMOUNT	"remount"/* change options on previous mount */
59 #define	MNTOPT_NOAUTO	"noauto"/* hide entry from mount -a */
60 #define MNTOPT_NOSUB	"nosub"  /* disallow mounts beneath this one */
61 
62 /*  4.2 specific options  */
63 #define	MNTOPT_QUOTA	"quota"	/* quotas */
64 #define	MNTOPT_NOQUOTA	"noquota"/* no quotas */
65 
66 /*  NFS specific options  */
67 #define	MNTOPT_SOFT	"soft"	/* soft mount */
68 #define	MNTOPT_HARD	"hard"	/* hard mount (default) */
69 #define	MNTOPT_NOSUID	"nosuid"/* no set uid allowed */
70 #define	MNTOPT_INTR	"intr"	/* allow interrupts on hard mount */
71 #define MNTOPT_SECURE 	"secure"/* use secure RPC for NFS */
72 #define MNTOPT_NOAC 	"noac"	/* don't cache file attributes */
73 #define MNTOPT_NOCTO 	"nocto"	/* no "close to open" attr consistency */
74 #define MNTOPT_PORT	"port"	/* server IP port number */
75 #define MNTOPT_RETRANS 	"retrans" /* set number of request retries */
76 #define MNTOPT_RSIZE 	"rsize" /* set read size (bytes) */
77 #define MNTOPT_WSIZE 	"wsize" /* set write size (bytes) */
78 #define MNTOPT_TIMEO 	"timeo"	/* set initial timeout (1/10 sec) */
79 #define MNTOPT_ACTIMEO 	"actimeo" /* attr cache timeout (sec) */
80 #define MNTOPT_ACREGMIN "acregmin" /* min ac timeout for reg files (sec) */
81 #define MNTOPT_ACREGMAX "acregmax" /* max ac timeout for reg files (sec) */
82 #define MNTOPT_ACDIRMIN "acdirmin" /* min ac timeout for dirs (sec) */
83 #define MNTOPT_ACDIRMAX "acdirmax" /* max ac timeout for dirs (sec) */
84 #define	MNTOPT_POSIX	"posix"	/* ask for static pathconf values from mountd */
85 
86 /* Information about the mount entry */
87 #define MNTINFO_DEV	"dev"	/* device number of the mounted file system */
88 
89 struct	mntent {
90 	char	*mnt_fsname;		/* name of mounted file system */
91 	char	*mnt_dir;		/* file system path prefix */
92 	char	*mnt_type;		/* MNTTYPE_* */
93 	char	*mnt_opts;		/* MNTOPT* */
94 	int	mnt_freq;		/* dump frequency, in days */
95 	int	mnt_passno;		/* pass number on parallel fsck */
96 };
97 
98 struct	mntent *getmntent();
99 char	*hasmntopt();
100 FILE	*setmntent();
101 int	endmntent();
102 
103 #endif /*!_mntent_h*/
104