1cbdc3aeb523785af8b8caac98ce638e47551e9f
[zfs.git] / lib / libspl / include / sys / mntent.h
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 http://www.opensolaris.org/os/licensing.
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 MNTTYPE_ZFS     "zfs"           /* ZFS file system */
33
34 #define MOUNT_SUCCESS   0x00            /* Success */
35 #define MOUNT_USAGE     0x01            /* Invalid invocation or permissions */
36 #define MOUNT_SYSERR    0x02            /* System error (ENOMEM, etc) */
37 #define MOUNT_SOFTWARE  0x04            /* Internal mount bug */
38 #define MOUNT_USER      0x08            /* Interrupted by user (EINTR) */
39 #define MOUNT_FILEIO    0x10            /* Error updating/locking /etc/mtab */
40 #define MOUNT_FAIL      0x20            /* Mount failed */
41 #define MOUNT_SOMEOK    0x40            /* At least on mount succeeded */
42
43 #define MNTOPT_ASYNC    "async"         /* all I/O is asynchronous */
44 #define MNTOPT_ATIME    "atime"         /* update atime for files */
45 #define MNTOPT_NOATIME  "noatime"       /* do not update atime for files */
46 #define MNTOPT_AUTO     "auto"          /* automount */
47 #define MNTOPT_NOAUTO   "noauto"        /* do not automount */
48 #define MNTOPT_CONTEXT  "context"       /* selinux context */
49 #define MNTOPT_NOCONTEXT "nocontext"    /* No selinux context (zfs-only) */
50 #define MNTOPT_FSCONTEXT "fscontext"    /* selinux fscontext */
51 #define MNTOPT_DEFCONTEXT "defcontext"  /* selinux defcontext */
52 #define MNTOPT_ROOTCONTEXT "rootcontext" /* selinux rootcontext */
53 #define MNTOPT_DEFAULTS "defaults"      /* defaults */
54 #define MNTOPT_DEVICES  "dev"           /* device-special allowed */
55 #define MNTOPT_NODEVICES "nodev"        /* device-special disallowed */
56 #define MNTOPT_DIRATIME "diratime"      /* update atime for dirs */
57 #define MNTOPT_NODIRATIME "nodiratime"  /* do not update atime for dirs */
58 #define MNTOPT_DIRSYNC  "dirsync"       /* do dir updates synchronously */
59 #define MNTOPT_EXEC     "exec"          /* enable executables */
60 #define MNTOPT_NOEXEC   "noexec"        /* disable executables */
61 #define MNTOPT_GROUP    "group"         /* allow group mount */
62 #define MNTOPT_NOGROUP  "nogroup"       /* do not allow group mount */
63 #define MNTOPT_IVERSION "iversion"      /* update inode version */
64 #define MNTOPT_NOIVERSION "noiversion"  /* do not update inode version */
65 #define MNTOPT_NBMAND   "mand"          /* allow non-blocking mandatory locks */
66 #define MNTOPT_NONBMAND "nomand"        /* deny non-blocking mandatory locks */
67 #define MNTOPT_NETDEV   "_netdev"       /* network device */
68 #define MNTOPT_NOFAIL   "nofail"        /* no failure */
69 #define MNTOPT_RELATIME "relatime"      /* allow relative time updates */
70 #define MNTOPT_NORELATIME "norelatime"  /* do not allow relative time updates */
71 #define MNTOPT_DFRATIME "strictatime"   /* Deferred access time updates */
72 #define MNTOPT_NODFRATIME "nostrictatime" /* No Deferred access time updates */
73 #define MNTOPT_SETUID   "suid"          /* Both setuid and devices allowed */
74 #define MNTOPT_NOSETUID "nosuid"        /* Neither setuid nor devices allowed */
75 #define MNTOPT_OWNER    "owner"         /* allow owner mount */
76 #define MNTOPT_NOOWNER  "noowner"       /* do not allow owner mount */
77 #define MNTOPT_REMOUNT  "remount"       /* change mount options */
78 #define MNTOPT_RO       "ro"            /* read only */
79 #define MNTOPT_RW       "rw"            /* read/write */
80 #define MNTOPT_SYNC     "sync"          /* all I/O is synchronous */
81 #define MNTOPT_USER     "user"          /* allow user mount */
82 #define MNTOPT_NOUSER   "nouser"        /* do not allow user mount */
83 #define MNTOPT_USERS    "users"         /* allow user mount */
84 #define MNTOPT_NOUSERS  "nousers"       /* do not allow user mount */
85 #define MNTOPT_SUB      "sub"           /* allow mounts on subdirs */
86 #define MNTOPT_NOSUB    "nosub"         /* do not allow mounts on subdirs */
87 #define MNTOPT_QUIET    "quiet"         /* quiet mount */
88 #define MNTOPT_LOUD     "loud"          /* verbose mount */
89 #define MNTOPT_BIND     "bind"          /* remount part of a tree */
90 #define MNTOPT_RBIND    "rbind"         /* include subtrees */
91 #define MNTOPT_XATTR    "user_xattr"    /* enable extended attributes */
92 #define MNTOPT_NOXATTR  "nouser_xattr"  /* disable extended attributes */
93 #define MNTOPT_COMMENT  "comment"       /* comment */
94 #define MNTOPT_ZFSUTIL  "zfsutil"       /* called by zfs utility */
95
96 #define ZS_COMMENT      0x00000000      /* comment */
97 #define ZS_ZFSUTIL      0x00000001      /* caller is zfs(8) */
98 #define ZS_NOCONTEXT    0x00000002      /* do not add selinux context */
99
100 #endif  /* _SYS_MNTENT_H */