The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/contrib/openzfs/config/kernel-mkdir.m4

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 dnl #
    2 dnl # Supported mkdir() interfaces checked newest to oldest.
    3 dnl #
    4 AC_DEFUN([ZFS_AC_KERNEL_SRC_MKDIR], [
    5         dnl #
    6         dnl # 5.12 API change
    7         dnl # The struct user_namespace arg was added as the first argument to
    8         dnl # mkdir()
    9         dnl #
   10         ZFS_LINUX_TEST_SRC([mkdir_user_namespace], [
   11                 #include <linux/fs.h>
   12 
   13                 int mkdir(struct user_namespace *userns,
   14                         struct inode *inode, struct dentry *dentry,
   15                     umode_t umode) { return 0; }
   16 
   17                 static const struct inode_operations
   18                     iops __attribute__ ((unused)) = {
   19                         .mkdir = mkdir,
   20                 };
   21         ],[])
   22 
   23         dnl #
   24         dnl # 3.3 API change
   25         dnl # The VFS .create, .mkdir and .mknod callbacks were updated to take a
   26         dnl # umode_t type rather than an int.  The expectation is that any backport
   27         dnl # would also change all three prototypes.  However, if it turns out that
   28         dnl # some distribution doesn't backport the whole thing this could be
   29         dnl # broken apart into three separate checks.
   30         dnl #
   31         ZFS_LINUX_TEST_SRC([inode_operations_mkdir], [
   32                 #include <linux/fs.h>
   33 
   34                 int mkdir(struct inode *inode, struct dentry *dentry,
   35                     umode_t umode) { return 0; }
   36 
   37                 static const struct inode_operations
   38                     iops __attribute__ ((unused)) = {
   39                         .mkdir = mkdir,
   40                 };
   41         ],[])
   42 ])
   43 
   44 AC_DEFUN([ZFS_AC_KERNEL_MKDIR], [
   45         dnl #
   46         dnl # 5.12 API change
   47         dnl # The struct user_namespace arg was added as the first argument to
   48         dnl # mkdir() of the iops structure.
   49         dnl #
   50         AC_MSG_CHECKING([whether iops->mkdir() takes struct user_namespace*])
   51         ZFS_LINUX_TEST_RESULT([mkdir_user_namespace], [
   52                 AC_MSG_RESULT(yes)
   53                 AC_DEFINE(HAVE_IOPS_MKDIR_USERNS, 1,
   54                     [iops->mkdir() takes struct user_namespace*])
   55         ],[
   56                 AC_MSG_RESULT(no)
   57 
   58                 AC_MSG_CHECKING([whether iops->mkdir() takes umode_t])
   59                 ZFS_LINUX_TEST_RESULT([inode_operations_mkdir], [
   60                         AC_MSG_RESULT(yes)
   61                         AC_DEFINE(HAVE_MKDIR_UMODE_T, 1,
   62                             [iops->mkdir() takes umode_t])
   63                 ],[
   64                         ZFS_LINUX_TEST_ERROR([mkdir()])
   65                 ])
   66         ])
   67 ])

Cache object: 2f1abecd8f1714a0c17b7211adb6fc59


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.