summaryrefslogtreecommitdiff
path: root/include/am_compat.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/am_compat.h')
-rw-r--r--include/am_compat.h91
1 files changed, 85 insertions, 6 deletions
diff --git a/include/am_compat.h b/include/am_compat.h
index dc3b71d744681..3463f3fa591c2 100644
--- a/include/am_compat.h
+++ b/include/am_compat.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-2006 Erez Zadok
+ * Copyright (c) 1997-2014 Erez Zadok
* Copyright (c) 1990 Jan-Simon Pendry
* Copyright (c) 1990 Imperial College of Science, Technology & Medicine
* Copyright (c) 1990 The Regents of the University of California.
@@ -16,11 +16,7 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgment:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
@@ -90,6 +86,10 @@
# define MNTTAB_OPT_NOAC "noac"
#endif /* defined(MNT2_NFS_OPT_NOAC) && !defined(MNTTAB_OPT_NOAC) */
+#if defined(MNT2_NFS_OPT_NOACL) && !defined(MNTTAB_OPT_NOACL)
+# define MNTTAB_OPT_NOACL "noacl"
+#endif /* defined(MNT2_NFS_OPT_NOACL) && !defined(MNTTAB_OPT_NOACL) */
+
#if defined(MNT2_NFS_OPT_NOCONN) && !defined(MNTTAB_OPT_NOCONN)
# define MNTTAB_OPT_NOCONN "noconn"
# ifndef MNTTAB_OPT_CONN
@@ -176,10 +176,30 @@
#if defined(MNT2_CDFS_OPT_GENS) && !defined(MNTTAB_OPT_GENS)
# define MNTTAB_OPT_GENS "gens"
#endif /* defined(MNT2_CDFS_OPT_GENS) && !defined(MNTTAB_OPT_GENS) */
+
#if defined(MNT2_CDFS_OPT_EXTATT) && !defined(MNTTAB_OPT_EXTATT)
# define MNTTAB_OPT_EXTATT "extatt"
#endif /* defined(MNT2_CDFS_OPT_EXTATT) && !defined(MNTTAB_OPT_EXTATT) */
+#if defined(MNT2_CDFS_OPT_NOJOLIET) && !defined(MNTTAB_OPT_NOJOLIET)
+# define MNTTAB_OPT_NOJOLIET "nojoliet"
+#endif /* defined(MNT2_CDFS_OPT_NOJOLIET) && !defined(MNTTAB_OPT_NOJOLIET) */
+
+#if defined(MNT2_CDFS_OPT_NOCASETRANS) && !defined(MNTTAB_OPT_NOCASETRANS)
+# define MNTTAB_OPT_NOCASETRANS "nocasetrans"
+#endif /* defined(MNT2_CDFS_OPT_NOCASETRANS) && !defined(MNTTAB_OPT_NOCASETRANS) */
+
+#if defined(MNT2_CDFS_OPT_RRCASEINS) && !defined(MNTTAB_OPT_RRCASEINS)
+# define MNTTAB_OPT_RRCASEINS "rrcaseins"
+#endif /* defined(MNT2_CDFS_OPT_RRCASEINS) && !defined(MNTTAB_OPT_RRCASEINS) */
+
+/*
+ * Complete MNTTAB_OPT_* options based on MNT2_UDF_OPT_* mount options.
+ */
+#if defined(MNT2_UDF_OPT_CLOSESESSION) && !defined(MNTTAB_OPT_CLOSESESSION)
+# define MNTTAB_OPT_CLOSESESSION "closesession"
+#endif /* defined(MNT2_UDF_OPT_CLOSESESSION) && !defined(MNTTAB_OPT_CLOSESESSION) */
+
/*
* Complete MNTTAB_OPT_* options based on MNT2_PCFS_OPT_* mount options.
*/
@@ -236,6 +256,29 @@
# define MNTTAB_OPT_SYNC "sync"
#endif /* defined(MNT2_GEN_OPT_SYNC) && !defined(MNTTAB_OPT_SYNC) */
+#if defined(MNT2_GEN_OPT_LOG) && !defined(MNTTAB_OPT_LOG)
+# define MNTTAB_OPT_LOG "log"
+#endif /* defined(MNT2_GEN_OPT_LOG) && !defined(MNTTAB_OPT_LOG) */
+
+#if defined(MNT2_GEN_OPT_NOATIME) && !defined(MNTTAB_OPT_NOATIME)
+# define MNTTAB_OPT_NOATIME "noatime"
+#endif /* defined(MNT2_GEN_OPT_NOATIME) && !defined(MNTTAB_OPT_NOATIME) */
+
+#if defined(MNT2_GEN_OPT_NODEVMTIME) && !defined(MNTTAB_OPT_NODEVMTIME)
+# define MNTTAB_OPT_NODEVMTIME "nodevmtime"
+#endif /* defined(MNT2_GEN_OPT_NODEVMTIME) && !defined(MNTTAB_OPT_NODEVMTIME) */
+
+#if defined(MNT2_GEN_OPT_SOFTDEP) && !defined(MNTTAB_OPT_SOFTDEP)
+# define MNTTAB_OPT_SOFTDEP "softdep"
+#endif /* defined(MNT2_GEN_OPT_SOFTDEP) && !defined(MNTTAB_OPT_SOFTDEP) */
+
+#if defined(MNT2_GEN_OPT_SYMPERM) && !defined(MNTTAB_OPT_SYMPERM)
+# define MNTTAB_OPT_SYMPERM "symperm"
+#endif /* defined(MNT2_GEN_OPT_SYMPERM) && !defined(MNTTAB_OPT_SYMPERM) */
+
+#if defined(MNT2_GEN_OPT_UNION) && !defined(MNTTAB_OPT_UNION)
+# define MNTTAB_OPT_UNION "union"
+#endif /* defined(MNT2_GEN_OPT_UNION) && !defined(MNTTAB_OPT_UNION) */
/*
* Add missing MNTTAB_OPT_* options.
@@ -298,6 +341,20 @@
# define MNTTAB_OPT_DIRMASK "dirmask"
#endif /* not MNTTAB_OPT_DIRMASK */
+/* useful for udf mounts */
+#ifndef MNTTAB_OPT_USER
+# define MNTTAB_OPT_USER "user"
+#endif /* not MNTTAB_OPT_USER */
+#ifndef MNTTAB_OPT_GROUP
+# define MNTTAB_OPT_GROUP "group"
+#endif /* not MNTTAB_OPT_GROUP */
+#ifndef MNTTAB_OPT_GMTOFF
+# define MNTTAB_OPT_GMTOFF "gmtoff"
+#endif /* not MNTTAB_OPT_GMTOFF */
+#ifndef MNTTAB_OPT_SESSIONNR
+# define MNTTAB_OPT_SESSIONNR "sessionnr"
+#endif /* not MNTTAB_OPT_SESSIONNR */
+
/*
* Incomplete filesystem definitions (sunos4, irix6, solaris2)
*/
@@ -335,18 +392,32 @@ struct hsfs_args {
#endif /* defined(HAVE_FS_UFS) && !defined(ufs_args_t) */
/*
+ * if does not define struct udf_args, assume integer bit-field (linux)
+ */
+#if defined(HAVE_FS_UDF) && !defined(udf_args_t)
+# define udf_args_t u_int
+#endif /* defined(HAVE_FS_UDF) && !defined(udf_args_t) */
+
+/*
* if does not define struct efs_args, assume integer bit-field (linux)
*/
#if defined(HAVE_FS_EFS) && !defined(efs_args_t)
# define efs_args_t u_int
#endif /* defined(HAVE_FS_EFS) && !defined(efs_args_t) */
+#if defined(HAVE_FS_TMPFS) && !defined(tmpfs_args_t)
+# define tmpfs_args_t u_int
+#endif /* defined(HAVE_FS_TMPFS) && !defined(tmpfs_args_t) */
+
/*
* if does not define struct xfs_args, assume integer bit-field (linux)
*/
#if defined(HAVE_FS_XFS) && !defined(xfs_args_t)
# define xfs_args_t u_int
#endif /* defined(HAVE_FS_XFS) && !defined(xfs_args_t) */
+#if defined(HAVE_FS_EXT) && !defined(ext_args_t)
+# define ext_args_t u_int
+#endif /* defined(HAVE_FS_EXT) && !defined(ext_args_t) */
#if defined(HAVE_FS_AUTOFS) && defined(MOUNT_TYPE_AUTOFS) && !defined(MNTTYPE_AUTOFS)
# define MNTTYPE_AUTOFS "autofs"
@@ -366,6 +437,14 @@ struct hsfs_args {
#endif /* not HAVE_FS_NFS3 */
/*
+ * If NFS4, then make sure that the "sec" mnttab option is available.
+ */
+#ifdef HAVE_FS_NFS4
+# ifndef MNTTAB_OPT_SEC
+# define MNTTAB_OPT_SEC "sec"
+# endif /* not MNTTAB_OPT_SEC */
+#endif /* not HAVE_FS_NFS4 */
+/*
* If loop device (header file) exists, define mount table option
*/
#if defined(HAVE_LOOP_DEVICE) && !defined(MNTTAB_OPT_LOOP)