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