xref: /titanic_41/usr/src/uts/common/sys/mntio.h (revision 835ee2195df075073d2670eb95a6eab413d6c789)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*835ee219SRobert Harris  * Common Development and Distribution License (the "License").
6*835ee219SRobert Harris  * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate  *
87c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate  * and limitations under the License.
127c478bd9Sstevel@tonic-gate  *
137c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * CDDL HEADER END
207c478bd9Sstevel@tonic-gate  */
217c478bd9Sstevel@tonic-gate /*
22*835ee219SRobert Harris  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
247c478bd9Sstevel@tonic-gate  */
257c478bd9Sstevel@tonic-gate 
267c478bd9Sstevel@tonic-gate #ifndef _SYS_MNTIO_H
277c478bd9Sstevel@tonic-gate #define	_SYS_MNTIO_H
287c478bd9Sstevel@tonic-gate 
297c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
307c478bd9Sstevel@tonic-gate extern "C" {
317c478bd9Sstevel@tonic-gate #endif
327c478bd9Sstevel@tonic-gate 
337c478bd9Sstevel@tonic-gate /*
347c478bd9Sstevel@tonic-gate  * Mntfs io control commands
357c478bd9Sstevel@tonic-gate  */
367c478bd9Sstevel@tonic-gate #define	MNTIOC			('m' << 8)
377c478bd9Sstevel@tonic-gate #define	MNTIOC_NMNTS		(MNTIOC|1)	/* Get # of mounted resources */
387c478bd9Sstevel@tonic-gate #define	MNTIOC_GETDEVLIST	(MNTIOC|2)	/* Get mounted dev no.'s */
397c478bd9Sstevel@tonic-gate #define	MNTIOC_SETTAG		(MNTIOC|3)	/* Set a tag on a mounted fs */
407c478bd9Sstevel@tonic-gate #define	MNTIOC_CLRTAG		(MNTIOC|4)	/* Clear a tag from a fs */
417c478bd9Sstevel@tonic-gate #define	MNTIOC_SHOWHIDDEN	(MNTIOC|6)	/* private */
427c478bd9Sstevel@tonic-gate #define	MNTIOC_GETMNTENT	(MNTIOC|7)	/* private */
43*835ee219SRobert Harris #define	MNTIOC_GETEXTMNTENT	(MNTIOC|8)	/* private */
44*835ee219SRobert Harris #define	MNTIOC_GETMNTANY	(MNTIOC|9)	/* private */
45*835ee219SRobert Harris 
46*835ee219SRobert Harris /*
47*835ee219SRobert Harris  * Private mntfs return codes
48*835ee219SRobert Harris  */
49*835ee219SRobert Harris #define	MNTFS_EOF	1
50*835ee219SRobert Harris #define	MNTFS_TOOLONG	2
51*835ee219SRobert Harris 
527c478bd9Sstevel@tonic-gate 
537c478bd9Sstevel@tonic-gate #define	MAX_MNTOPT_TAG	64	/* Maximum size for a mounted file system tag */
547c478bd9Sstevel@tonic-gate 
557c478bd9Sstevel@tonic-gate struct mnttagdesc {
567c478bd9Sstevel@tonic-gate 	uint_t	mtd_major;		/* major number of mounted resource */
577c478bd9Sstevel@tonic-gate 	uint_t	mtd_minor;		/* minor number of mounted resource */
587c478bd9Sstevel@tonic-gate 	char	*mtd_mntpt;		/* mount point for mounted resource */
597c478bd9Sstevel@tonic-gate 	char	*mtd_tag;		/* tag to set/clear */
607c478bd9Sstevel@tonic-gate };
617c478bd9Sstevel@tonic-gate 
627c478bd9Sstevel@tonic-gate #ifdef _SYSCALL32
637c478bd9Sstevel@tonic-gate struct mnttagdesc32 {
647c478bd9Sstevel@tonic-gate 	uint32_t	mtd_major;	/* major number of mounted resource */
657c478bd9Sstevel@tonic-gate 	uint32_t	mtd_minor;	/* minor number of mounted resource */
667c478bd9Sstevel@tonic-gate 	caddr32_t	mtd_mntpt;	/* mount point for mounted resource */
677c478bd9Sstevel@tonic-gate 	caddr32_t	mtd_tag;	/* tag to set/clear */
687c478bd9Sstevel@tonic-gate };
697c478bd9Sstevel@tonic-gate #endif /* _SYSCALL32 */
707c478bd9Sstevel@tonic-gate 
717c478bd9Sstevel@tonic-gate 
727c478bd9Sstevel@tonic-gate struct mntlookup {
737c478bd9Sstevel@tonic-gate 	size_t	mtl_mntpt_off;
747c478bd9Sstevel@tonic-gate 	char	*mtl_mntpt;
757c478bd9Sstevel@tonic-gate 	major_t	mtl_major;
767c478bd9Sstevel@tonic-gate 	minor_t	mtl_minor;
777c478bd9Sstevel@tonic-gate 	ino64_t	mtl_ino;
787c478bd9Sstevel@tonic-gate 	char	mtl_fstype[_ST_FSTYPSZ];
797c478bd9Sstevel@tonic-gate };
807c478bd9Sstevel@tonic-gate 
817c478bd9Sstevel@tonic-gate #ifdef _SYSCALL32
827c478bd9Sstevel@tonic-gate struct mntlookup32 {
837c478bd9Sstevel@tonic-gate 	size32_t	mtl_mntpt_off;
847c478bd9Sstevel@tonic-gate 	caddr32_t	mtl_mntpt;
857c478bd9Sstevel@tonic-gate 	major32_t	mtl_major;
867c478bd9Sstevel@tonic-gate 	minor32_t	mtl_minor;
877c478bd9Sstevel@tonic-gate 	ino64_t		mtl_ino;
887c478bd9Sstevel@tonic-gate 	char		mtl_fstype[_ST_FSTYPSZ];
897c478bd9Sstevel@tonic-gate };
907c478bd9Sstevel@tonic-gate #endif /* _SYSCALL32 */
917c478bd9Sstevel@tonic-gate 
927c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
937c478bd9Sstevel@tonic-gate }
947c478bd9Sstevel@tonic-gate #endif
957c478bd9Sstevel@tonic-gate 
967c478bd9Sstevel@tonic-gate #endif	/* _SYS_MNTIO_H */
97