xref: /titanic_52/usr/src/lib/libbc/inc/include/sys/mount.h (revision ba4e3c84e6b9390bbf7df80b5f1d11dec34cc525)
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 #ifndef	_sys_mount_h
28 #define	_sys_mount_h
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 /*
33  * mount options
34  */
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 struct	ufs_args {
46 	char	*fspec;
47 };
48 
49 
50 #define _PC_LAST	9		/* highest value of any _PC_ */
51 #define _BITS           (8 * sizeof(short))
52 #define _PC_N           ((_PC_LAST + _BITS - 1) / _BITS)
53 #define _PC_ISSET(n, a) (a[(n) / _BITS] & (1 << ((n) % _BITS)))
54 #define _PC_SET(n, a)   (a[(n) / _BITS] |= (1 << ((n) % _BITS)))
55 #define _PC_ERROR       0
56 
57 struct  pathcnf {
58         /*
59          * pathconf() information
60          */
61         int             pc_link_max;    /* max links allowed */
62         short           pc_max_canon;   /* max line len for a tty */
63         short           pc_max_input;   /* input a tty can eat all once */
64         short           pc_name_max;    /* max file name length (dir entry) */
65         short           pc_path_max;    /* path name len (/x/y/z/...) */
66         short           pc_pipe_buf;    /* size of a pipe (bytes) */
67         cc_t            pc_vdisable;    /* safe char to turn off c_cc[i] */
68         char            pc_xxx;         /* alignment padding; cc_t == char */
69         short           pc_mask[_PC_N]; /* see below */
70 };
71 
72 
73 struct	nfs_args {
74 	struct sockaddr_in	*addr;		/* file server address */
75 	caddr_t			fh;		/* File handle to be mounted */
76 	int			flags;		/* flags */
77 	int			wsize;		/* write size in bytes */
78 	int			rsize;		/* read size in bytes */
79 	int			timeo;		/* initial timeout in .1 secs */
80 	int			retrans;	/* times to retry send */
81 	char			*hostname;	/* server's hostname */
82 	int			acregmin;	/* attr cache file min secs */
83 	int			acregmax;	/* attr cache file max secs */
84 	int			acdirmin;	/* attr cache dir min secs */
85 	int			acdirmax;	/* attr cache dir max secs */
86 	char			*netname;	/* server's netname */
87 	struct pathcnf		*pathconf;	/* static pathconf kludge */
88 };
89 
90 /*
91  * NFS mount option flags
92  */
93 #define	NFSMNT_SOFT	0x001	/* soft mount (hard is default) */
94 #define	NFSMNT_WSIZE	0x002	/* set write size */
95 #define	NFSMNT_RSIZE	0x004	/* set read size */
96 #define	NFSMNT_TIMEO	0x008	/* set initial timeout */
97 #define	NFSMNT_RETRANS	0x010	/* set number of request retrys */
98 #define	NFSMNT_HOSTNAME	0x020	/* set hostname for error printf */
99 #define	NFSMNT_INT	0x040	/* allow interrupts on hard mount */
100 #define	NFSMNT_NOAC	0x080	/* don't cache attributes */
101 #define	NFSMNT_ACREGMIN	0x0100	/* set min secs for file attr cache */
102 #define	NFSMNT_ACREGMAX	0x0200	/* set max secs for file attr cache */
103 #define	NFSMNT_ACDIRMIN	0x0400	/* set min secs for dir attr cache */
104 #define	NFSMNT_ACDIRMAX	0x0800	/* set max secs for dir attr cache */
105 #define	NFSMNT_SECURE	0x1000	/* secure mount */
106 #define	NFSMNT_NOCTO	0x2000	/* no close-to-open consistency */
107 #define	NFSMNT_POSIX	0x4000	/* static pathconf kludge info */
108 
109 #endif	/* !_sys_mount_h */
110