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