xref: /onnv-gate/usr/src/uts/common/sys/mntio.h (revision 10910:951a65b3846b)
10Sstevel@tonic-gate /*
20Sstevel@tonic-gate  * CDDL HEADER START
30Sstevel@tonic-gate  *
40Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*10910SRobert.Harris@Sun.COM  * Common Development and Distribution License (the "License").
6*10910SRobert.Harris@Sun.COM  * You may not use this file except in compliance with the License.
70Sstevel@tonic-gate  *
80Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate  * See the License for the specific language governing permissions
110Sstevel@tonic-gate  * and limitations under the License.
120Sstevel@tonic-gate  *
130Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate  *
190Sstevel@tonic-gate  * CDDL HEADER END
200Sstevel@tonic-gate  */
210Sstevel@tonic-gate /*
22*10910SRobert.Harris@Sun.COM  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
230Sstevel@tonic-gate  * Use is subject to license terms.
240Sstevel@tonic-gate  */
250Sstevel@tonic-gate 
260Sstevel@tonic-gate #ifndef _SYS_MNTIO_H
270Sstevel@tonic-gate #define	_SYS_MNTIO_H
280Sstevel@tonic-gate 
290Sstevel@tonic-gate #ifdef	__cplusplus
300Sstevel@tonic-gate extern "C" {
310Sstevel@tonic-gate #endif
320Sstevel@tonic-gate 
330Sstevel@tonic-gate /*
340Sstevel@tonic-gate  * Mntfs io control commands
350Sstevel@tonic-gate  */
360Sstevel@tonic-gate #define	MNTIOC			('m' << 8)
370Sstevel@tonic-gate #define	MNTIOC_NMNTS		(MNTIOC|1)	/* Get # of mounted resources */
380Sstevel@tonic-gate #define	MNTIOC_GETDEVLIST	(MNTIOC|2)	/* Get mounted dev no.'s */
390Sstevel@tonic-gate #define	MNTIOC_SETTAG		(MNTIOC|3)	/* Set a tag on a mounted fs */
400Sstevel@tonic-gate #define	MNTIOC_CLRTAG		(MNTIOC|4)	/* Clear a tag from a fs */
410Sstevel@tonic-gate #define	MNTIOC_SHOWHIDDEN	(MNTIOC|6)	/* private */
420Sstevel@tonic-gate #define	MNTIOC_GETMNTENT	(MNTIOC|7)	/* private */
43*10910SRobert.Harris@Sun.COM #define	MNTIOC_GETEXTMNTENT	(MNTIOC|8)	/* private */
44*10910SRobert.Harris@Sun.COM #define	MNTIOC_GETMNTANY	(MNTIOC|9)	/* private */
45*10910SRobert.Harris@Sun.COM 
46*10910SRobert.Harris@Sun.COM /*
47*10910SRobert.Harris@Sun.COM  * Private mntfs return codes
48*10910SRobert.Harris@Sun.COM  */
49*10910SRobert.Harris@Sun.COM #define	MNTFS_EOF	1
50*10910SRobert.Harris@Sun.COM #define	MNTFS_TOOLONG	2
51*10910SRobert.Harris@Sun.COM 
520Sstevel@tonic-gate 
530Sstevel@tonic-gate #define	MAX_MNTOPT_TAG	64	/* Maximum size for a mounted file system tag */
540Sstevel@tonic-gate 
550Sstevel@tonic-gate struct mnttagdesc {
560Sstevel@tonic-gate 	uint_t	mtd_major;		/* major number of mounted resource */
570Sstevel@tonic-gate 	uint_t	mtd_minor;		/* minor number of mounted resource */
580Sstevel@tonic-gate 	char	*mtd_mntpt;		/* mount point for mounted resource */
590Sstevel@tonic-gate 	char	*mtd_tag;		/* tag to set/clear */
600Sstevel@tonic-gate };
610Sstevel@tonic-gate 
620Sstevel@tonic-gate #ifdef _SYSCALL32
630Sstevel@tonic-gate struct mnttagdesc32 {
640Sstevel@tonic-gate 	uint32_t	mtd_major;	/* major number of mounted resource */
650Sstevel@tonic-gate 	uint32_t	mtd_minor;	/* minor number of mounted resource */
660Sstevel@tonic-gate 	caddr32_t	mtd_mntpt;	/* mount point for mounted resource */
670Sstevel@tonic-gate 	caddr32_t	mtd_tag;	/* tag to set/clear */
680Sstevel@tonic-gate };
690Sstevel@tonic-gate #endif /* _SYSCALL32 */
700Sstevel@tonic-gate 
710Sstevel@tonic-gate 
720Sstevel@tonic-gate struct mntlookup {
730Sstevel@tonic-gate 	size_t	mtl_mntpt_off;
740Sstevel@tonic-gate 	char	*mtl_mntpt;
750Sstevel@tonic-gate 	major_t	mtl_major;
760Sstevel@tonic-gate 	minor_t	mtl_minor;
770Sstevel@tonic-gate 	ino64_t	mtl_ino;
780Sstevel@tonic-gate 	char	mtl_fstype[_ST_FSTYPSZ];
790Sstevel@tonic-gate };
800Sstevel@tonic-gate 
810Sstevel@tonic-gate #ifdef _SYSCALL32
820Sstevel@tonic-gate struct mntlookup32 {
830Sstevel@tonic-gate 	size32_t	mtl_mntpt_off;
840Sstevel@tonic-gate 	caddr32_t	mtl_mntpt;
850Sstevel@tonic-gate 	major32_t	mtl_major;
860Sstevel@tonic-gate 	minor32_t	mtl_minor;
870Sstevel@tonic-gate 	ino64_t		mtl_ino;
880Sstevel@tonic-gate 	char		mtl_fstype[_ST_FSTYPSZ];
890Sstevel@tonic-gate };
900Sstevel@tonic-gate #endif /* _SYSCALL32 */
910Sstevel@tonic-gate 
920Sstevel@tonic-gate #ifdef	__cplusplus
930Sstevel@tonic-gate }
940Sstevel@tonic-gate #endif
950Sstevel@tonic-gate 
960Sstevel@tonic-gate #endif	/* _SYS_MNTIO_H */
97