xref: /freebsd/sys/contrib/openzfs/include/sys/mntent.h (revision 271171e0d97b88ba2a7c3bf750c9672b484c1c13)
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 (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or https://opensource.org/licenses/CDDL-1.0.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 /*
22  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  *
25  *	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
26  *		All Rights Reserved
27  */
28 
29 #ifndef _SYS_MNTENT_H
30 #define	_SYS_MNTENT_H
31 
32 #define	MNTMAXSTR	128
33 
34 #define	MNTTYPE_ZFS	"zfs"		/* ZFS file system */
35 
36 #define	MOUNT_SUCCESS	0x00		/* Success */
37 #define	MOUNT_USAGE	0x01		/* Invalid invocation or permissions */
38 #define	MOUNT_SYSERR	0x02		/* System error (ENOMEM, etc) */
39 #define	MOUNT_SOFTWARE	0x04		/* Internal mount bug */
40 #define	MOUNT_USER	0x08		/* Interrupted by user (EINTR) */
41 #define	MOUNT_FILEIO	0x10		/* Error updating/locking /etc/mtab */
42 #define	MOUNT_FAIL	0x20		/* Mount failed */
43 #define	MOUNT_SOMEOK	0x40		/* At least on mount succeeded */
44 #define	MOUNT_BUSY	0x80		/* Mount failed due to EBUSY */
45 
46 #define	MNTOPT_ASYNC	"async"		/* all I/O is asynchronous */
47 #define	MNTOPT_ATIME	"atime"		/* update atime for files */
48 #define	MNTOPT_NOATIME	"noatime"	/* do not update atime for files */
49 #define	MNTOPT_AUTO	"auto"		/* automount */
50 #define	MNTOPT_NOAUTO	"noauto"	/* do not automount */
51 #define	MNTOPT_CONTEXT	"context"	/* selinux context */
52 #define	MNTOPT_FSCONTEXT "fscontext"	/* selinux fscontext */
53 #define	MNTOPT_DEFCONTEXT "defcontext"	/* selinux defcontext */
54 #define	MNTOPT_ROOTCONTEXT "rootcontext" /* selinux rootcontext */
55 #define	MNTOPT_DEFAULTS	"defaults"	/* defaults */
56 #define	MNTOPT_DEVICES	"dev"		/* device-special allowed */
57 #define	MNTOPT_NODEVICES "nodev"	/* device-special disallowed */
58 #define	MNTOPT_DIRATIME	"diratime"	/* update atime for dirs */
59 #define	MNTOPT_NODIRATIME "nodiratime"	/* do not update atime for dirs */
60 #define	MNTOPT_DIRSYNC	"dirsync"	/* do dir updates synchronously */
61 #define	MNTOPT_EXEC	"exec"		/* enable executables */
62 #define	MNTOPT_NOEXEC	"noexec"	/* disable executables */
63 #define	MNTOPT_GROUP	"group"		/* allow group mount */
64 #define	MNTOPT_NOGROUP	"nogroup"	/* do not allow group mount */
65 #define	MNTOPT_IVERSION	"iversion"	/* update inode version */
66 #define	MNTOPT_NOIVERSION "noiversion"	/* do not update inode version */
67 #define	MNTOPT_NBMAND	"mand"		/* allow non-blocking mandatory locks */
68 #define	MNTOPT_NONBMAND	"nomand"	/* deny non-blocking mandatory locks */
69 #define	MNTOPT_NETDEV	"_netdev"	/* network device */
70 #define	MNTOPT_NOFAIL	"nofail"	/* no failure */
71 #define	MNTOPT_RELATIME	"relatime"	/* allow relative time updates */
72 #define	MNTOPT_NORELATIME "norelatime"	/* do not allow relative time updates */
73 #define	MNTOPT_STRICTATIME "strictatime" /* strict access time updates */
74 #define	MNTOPT_NOSTRICTATIME "nostrictatime" /* No strict access time updates */
75 #define	MNTOPT_LAZYTIME "lazytime"	/* Defer access time writing */
76 #ifdef __linux__
77 #define	MNTOPT_SETUID	"suid"		/* Both setuid and devices allowed */
78 #define	MNTOPT_NOSETUID	"nosuid"	/* Neither setuid nor devices allowed */
79 #elif defined(__FreeBSD__)
80 #define	MNTOPT_SETUID	"setuid"	/* Set uid allowed */
81 #define	MNTOPT_NOSETUID	"nosetuid"	/* Set uid not allowed */
82 #else
83 #error "unknown OS"
84 #endif
85 #define	MNTOPT_OWNER	"owner"		/* allow owner mount */
86 #define	MNTOPT_NOOWNER	"noowner"	/* do not allow owner mount */
87 #define	MNTOPT_REMOUNT	"remount"	/* change mount options */
88 #define	MNTOPT_RO	"ro"		/* read only */
89 #define	MNTOPT_RW	"rw"		/* read/write */
90 #define	MNTOPT_SYNC	"sync"		/* all I/O is synchronous */
91 #define	MNTOPT_USER	"user"		/* allow user mount */
92 #define	MNTOPT_NOUSER	"nouser"	/* do not allow user mount */
93 #define	MNTOPT_USERS	"users"		/* allow user mount */
94 #define	MNTOPT_NOUSERS	"nousers"	/* do not allow user mount */
95 #define	MNTOPT_SUB	"sub"		/* allow mounts on subdirs */
96 #define	MNTOPT_NOSUB	"nosub"		/* do not allow mounts on subdirs */
97 #define	MNTOPT_QUIET	"quiet"		/* quiet mount */
98 #define	MNTOPT_LOUD	"loud"		/* verbose mount */
99 #define	MNTOPT_BIND	"bind"		/* remount part of a tree */
100 #define	MNTOPT_RBIND	"rbind"		/* include subtrees */
101 #define	MNTOPT_DIRXATTR	"dirxattr"	/* enable directory xattrs */
102 #define	MNTOPT_SAXATTR	"saxattr"	/* enable system-attribute xattrs */
103 #define	MNTOPT_XATTR	"xattr"		/* enable extended attributes */
104 #define	MNTOPT_NOXATTR	"noxattr"	/* disable extended attributes */
105 #define	MNTOPT_COMMENT	"comment"	/* comment */
106 #define	MNTOPT_ZFSUTIL	"zfsutil"	/* called by zfs utility */
107 #define	MNTOPT_ACL	"acl"		/* passed by util-linux-2.24 mount */
108 #define	MNTOPT_NOACL	"noacl"		/* likewise */
109 #define	MNTOPT_POSIXACL	"posixacl"	/* likewise */
110 #define	MNTOPT_MNTPOINT	"mntpoint"	/* mount point hint */
111 #define	MNTOPT_CASESENSITIVE	"casesensitive"		/* case sensitivity */
112 #define	MNTOPT_CASEINSENSITIVE	"caseinsensitive"	/* case insensitivity */
113 #define	MNTOPT_CASEMIXED	"casemixed"		/* case mixed */
114 
115 #endif	/* _SYS_MNTENT_H */
116