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-rw.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 # 4.14 API change
    3 dnl # kernel_write() which was introduced in 3.9 was updated to take
    4 dnl # the offset as a pointer which is needed by vn_rdwr().
    5 dnl #
    6 AC_DEFUN([ZFS_AC_KERNEL_SRC_WRITE], [
    7         ZFS_LINUX_TEST_SRC([kernel_write], [
    8                 #include <linux/fs.h>
    9         ],[
   10                 struct file *file = NULL;
   11                 const void *buf = NULL;
   12                 size_t count = 0;
   13                 loff_t *pos = NULL;
   14                 ssize_t ret;
   15 
   16                 ret = kernel_write(file, buf, count, pos);
   17         ])
   18 ])
   19 
   20 AC_DEFUN([ZFS_AC_KERNEL_WRITE], [
   21         AC_MSG_CHECKING([whether kernel_write() takes loff_t pointer])
   22         ZFS_LINUX_TEST_RESULT([kernel_write], [
   23                 AC_MSG_RESULT(yes)
   24                 AC_DEFINE(HAVE_KERNEL_WRITE_PPOS, 1,
   25                     [kernel_write() take loff_t pointer])
   26         ],[
   27                 AC_MSG_RESULT(no)
   28         ])
   29 ])
   30 
   31 dnl #
   32 dnl # 4.14 API change
   33 dnl # kernel_read() which has existed for forever was updated to take
   34 dnl # the offset as a pointer which is needed by vn_rdwr().
   35 dnl #
   36 AC_DEFUN([ZFS_AC_KERNEL_SRC_READ], [
   37         ZFS_LINUX_TEST_SRC([kernel_read], [
   38                 #include <linux/fs.h>
   39         ],[
   40                 struct file *file = NULL;
   41                 void *buf = NULL;
   42                 size_t count = 0;
   43                 loff_t *pos = NULL;
   44                 ssize_t ret;
   45 
   46                 ret = kernel_read(file, buf, count, pos);
   47         ])
   48 ])
   49 
   50 AC_DEFUN([ZFS_AC_KERNEL_READ], [
   51         AC_MSG_CHECKING([whether kernel_read() takes loff_t pointer])
   52         ZFS_LINUX_TEST_RESULT([kernel_read], [
   53                 AC_MSG_RESULT(yes)
   54                 AC_DEFINE(HAVE_KERNEL_READ_PPOS, 1,
   55                     [kernel_read() take loff_t pointer])
   56         ],[
   57                 AC_MSG_RESULT(no)
   58         ])
   59 ])
   60 
   61 AC_DEFUN([ZFS_AC_KERNEL_SRC_RW], [
   62         ZFS_AC_KERNEL_SRC_WRITE
   63         ZFS_AC_KERNEL_SRC_READ
   64 ])
   65 
   66 AC_DEFUN([ZFS_AC_KERNEL_RW], [
   67         ZFS_AC_KERNEL_WRITE
   68         ZFS_AC_KERNEL_READ
   69 ])

Cache object: 480c7c8cd5f50002bbe3d7f9837df81e


[ 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.