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-proc-operations.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 # 5.6 API Change
    3 dnl # The proc_ops structure was introduced to replace the use of
    4 dnl # of the file_operations structure when registering proc handlers.
    5 dnl #
    6 AC_DEFUN([ZFS_AC_KERNEL_SRC_PROC_OPERATIONS], [
    7         ZFS_LINUX_TEST_SRC([proc_ops_struct], [
    8                 #include <linux/proc_fs.h>
    9 
   10                 int test_open(struct inode *ip, struct file *fp) { return 0; }
   11                 ssize_t test_read(struct file *fp, char __user *ptr,
   12                     size_t size, loff_t *offp) { return 0; }
   13                 ssize_t test_write(struct file *fp, const char __user *ptr,
   14                     size_t size, loff_t *offp) { return 0; }
   15                 loff_t test_lseek(struct file *fp, loff_t off, int flag)
   16                     { return 0; }
   17                 int test_release(struct inode *ip, struct file *fp)
   18                     { return 0; }
   19 
   20                 const struct proc_ops test_ops __attribute__ ((unused)) = {
   21                         .proc_open      = test_open,
   22                         .proc_read      = test_read,
   23                         .proc_write     = test_write,
   24                         .proc_lseek     = test_lseek,
   25                         .proc_release   = test_release,
   26                 };
   27         ], [
   28                 struct proc_dir_entry *entry __attribute__ ((unused)) =
   29                     proc_create_data("test", 0444, NULL, &test_ops, NULL);
   30         ])
   31 ])
   32 
   33 AC_DEFUN([ZFS_AC_KERNEL_PROC_OPERATIONS], [
   34         AC_MSG_CHECKING([whether proc_ops structure exists])
   35         ZFS_LINUX_TEST_RESULT([proc_ops_struct], [
   36                 AC_MSG_RESULT(yes)
   37                 AC_DEFINE(HAVE_PROC_OPS_STRUCT, 1, [proc_ops structure exists])
   38         ], [
   39                 AC_MSG_RESULT(no)
   40         ])
   41 ])

Cache object: 7f131b80028d12d5bfd05e991610f394


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