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