xref: /titanic_44/usr/src/uts/common/sys/mntio.h (revision da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0)
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 2004 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef _SYS_MNTIO_H
28 #define	_SYS_MNTIO_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef	__cplusplus
33 extern "C" {
34 #endif
35 
36 /*
37  * Mntfs io control commands
38  */
39 #define	MNTIOC			('m' << 8)
40 #define	MNTIOC_NMNTS		(MNTIOC|1)	/* Get # of mounted resources */
41 #define	MNTIOC_GETDEVLIST	(MNTIOC|2)	/* Get mounted dev no.'s */
42 #define	MNTIOC_SETTAG		(MNTIOC|3)	/* Set a tag on a mounted fs */
43 #define	MNTIOC_CLRTAG		(MNTIOC|4)	/* Clear a tag from a fs */
44 #define	MNTIOC_SHOWHIDDEN	(MNTIOC|6)	/* private */
45 #define	MNTIOC_GETMNTENT	(MNTIOC|7)	/* private */
46 
47 #define	MAX_MNTOPT_TAG	64	/* Maximum size for a mounted file system tag */
48 
49 struct mnttagdesc {
50 	uint_t	mtd_major;		/* major number of mounted resource */
51 	uint_t	mtd_minor;		/* minor number of mounted resource */
52 	char	*mtd_mntpt;		/* mount point for mounted resource */
53 	char	*mtd_tag;		/* tag to set/clear */
54 };
55 
56 #ifdef _SYSCALL32
57 struct mnttagdesc32 {
58 	uint32_t	mtd_major;	/* major number of mounted resource */
59 	uint32_t	mtd_minor;	/* minor number of mounted resource */
60 	caddr32_t	mtd_mntpt;	/* mount point for mounted resource */
61 	caddr32_t	mtd_tag;	/* tag to set/clear */
62 };
63 #endif /* _SYSCALL32 */
64 
65 
66 struct mntlookup {
67 	size_t	mtl_mntpt_off;
68 	char	*mtl_mntpt;
69 	major_t	mtl_major;
70 	minor_t	mtl_minor;
71 	ino64_t	mtl_ino;
72 	char	mtl_fstype[_ST_FSTYPSZ];
73 };
74 
75 #ifdef _SYSCALL32
76 struct mntlookup32 {
77 	size32_t	mtl_mntpt_off;
78 	caddr32_t	mtl_mntpt;
79 	major32_t	mtl_major;
80 	minor32_t	mtl_minor;
81 	ino64_t		mtl_ino;
82 	char		mtl_fstype[_ST_FSTYPSZ];
83 };
84 #endif /* _SYSCALL32 */
85 
86 #ifdef	__cplusplus
87 }
88 #endif
89 
90 #endif	/* _SYS_MNTIO_H */
91