xref: /titanic_50/usr/src/lib/libbc/inc/include/sys/mount.h (revision bdfc6d18da790deeec2e0eb09c625902defe2498)
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 1993 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  * mount options
31  */
32 
33 #ifndef	_sys_mount_h
34 #define	_sys_mount_h
35 
36 #define	M_RDONLY	0x01	/* mount fs read only */
37 #define	M_NOSUID	0x02	/* mount fs with setuid not allowed */
38 #define	M_NEWTYPE	0x04	/* use type string instead of int */
39 #define	M_GRPID		0x08	/* Old BSD group-id on create */
40 #define	M_REMOUNT	0x10	/* change options on an existing mount */
41 #define	M_NOSUB		0x20	/* Disallow mounts beneath this mount */
42 #define	M_MULTI		0x40	/* Do multi-component lookup on files */
43 #define	M_SYS5		0x80	/* Mount with Sys 5-specific semantics */
44 
45 #ifdef	KERNEL
46 /*
47  * File system types, these correspond to entries in fsconf
48  */
49 #define	MOUNT_UFS	1
50 #define	MOUNT_NFS	2
51 #define	MOUNT_PC	3
52 #define	MOUNT_LO	4
53 #define	MOUNT_TFS	5
54 #define	MOUNT_TMP	6
55 #define	MOUNT_MAXTYPE	7
56 #endif	KERNEL
57 
58 struct	ufs_args {
59 	char	*fspec;
60 };
61 
62 
63 #define _PC_LAST	9		/* highest value of any _PC_ */
64 #define _BITS           (8 * sizeof(short))
65 #define _PC_N           ((_PC_LAST + _BITS - 1) / _BITS)
66 #define _PC_ISSET(n, a) (a[(n) / _BITS] & (1 << ((n) % _BITS)))
67 #define _PC_SET(n, a)   (a[(n) / _BITS] |= (1 << ((n) % _BITS)))
68 #define _PC_ERROR       0
69 
70 struct  pathcnf {
71         /*
72          * pathconf() information
73          */
74         int             pc_link_max;    /* max links allowed */
75         short           pc_max_canon;   /* max line len for a tty */
76         short           pc_max_input;   /* input a tty can eat all once */
77         short           pc_name_max;    /* max file name length (dir entry) */
78         short           pc_path_max;    /* path name len (/x/y/z/...) */
79         short           pc_pipe_buf;    /* size of a pipe (bytes) */
80         cc_t            pc_vdisable;    /* safe char to turn off c_cc[i] */
81         char            pc_xxx;         /* alignment padding; cc_t == char */
82         short           pc_mask[_PC_N]; /* see below */
83 #ifdef  KERNEL
84         short           pc_refcnt;      /* number of mounts that use this */
85         struct pathcnf  *pc_next;       /* linked list */
86 #endif
87 };
88 
89 
90 struct	nfs_args {
91 	struct sockaddr_in	*addr;		/* file server address */
92 	caddr_t			fh;		/* File handle to be mounted */
93 	int			flags;		/* flags */
94 	int			wsize;		/* write size in bytes */
95 	int			rsize;		/* read size in bytes */
96 	int			timeo;		/* initial timeout in .1 secs */
97 	int			retrans;	/* times to retry send */
98 	char			*hostname;	/* server's hostname */
99 	int			acregmin;	/* attr cache file min secs */
100 	int			acregmax;	/* attr cache file max secs */
101 	int			acdirmin;	/* attr cache dir min secs */
102 	int			acdirmax;	/* attr cache dir max secs */
103 	char			*netname;	/* server's netname */
104 	struct pathcnf		*pathconf;	/* static pathconf kludge */
105 };
106 
107 /*
108  * NFS mount option flags
109  */
110 #define	NFSMNT_SOFT	0x001	/* soft mount (hard is default) */
111 #define	NFSMNT_WSIZE	0x002	/* set write size */
112 #define	NFSMNT_RSIZE	0x004	/* set read size */
113 #define	NFSMNT_TIMEO	0x008	/* set initial timeout */
114 #define	NFSMNT_RETRANS	0x010	/* set number of request retrys */
115 #define	NFSMNT_HOSTNAME	0x020	/* set hostname for error printf */
116 #define	NFSMNT_INT	0x040	/* allow interrupts on hard mount */
117 #define	NFSMNT_NOAC	0x080	/* don't cache attributes */
118 #define	NFSMNT_ACREGMIN	0x0100	/* set min secs for file attr cache */
119 #define	NFSMNT_ACREGMAX	0x0200	/* set max secs for file attr cache */
120 #define	NFSMNT_ACDIRMIN	0x0400	/* set min secs for dir attr cache */
121 #define	NFSMNT_ACDIRMAX	0x0800	/* set max secs for dir attr cache */
122 #define	NFSMNT_SECURE	0x1000	/* secure mount */
123 #define	NFSMNT_NOCTO	0x2000	/* no close-to-open consistency */
124 #define	NFSMNT_POSIX	0x4000	/* static pathconf kludge info */
125 
126 #ifdef	PCFS
127 struct	pc_args {
128 	char	*fspec;
129 };
130 #endif	PCFS
131 
132 #ifdef	LOFS
133 struct	lo_args {
134 	char    *fsdir;
135 };
136 #endif	LOFS
137 
138 #endif	/* !_sys_mount_h */
139