Add -p switch to "zpool get"
[zfs.git] / config / kernel-fallocate.m4
1 dnl #
2 dnl # Linux 2.6.38 - 3.x API
3 dnl #
4 AC_DEFUN([ZFS_AC_KERNEL_FILE_FALLOCATE], [
5         AC_MSG_CHECKING([whether fops->fallocate() exists])
6         ZFS_LINUX_TRY_COMPILE([
7                 #include <linux/fs.h>
8
9                 long test_fallocate(struct file *file, int mode,
10                     loff_t offset, loff_t len) { return 0; }
11
12                 static const struct file_operations
13                     fops __attribute__ ((unused)) = {
14                         .fallocate = test_fallocate,
15                 };
16         ],[
17         ],[
18                 AC_MSG_RESULT(yes)
19                 AC_DEFINE(HAVE_FILE_FALLOCATE, 1, [fops->fallocate() exists])
20         ],[
21                 AC_MSG_RESULT(no)
22         ])
23 ])
24
25 dnl #
26 dnl # Linux 2.6.x - 2.6.37 API
27 dnl #
28 AC_DEFUN([ZFS_AC_KERNEL_INODE_FALLOCATE], [
29         AC_MSG_CHECKING([whether iops->fallocate() exists])
30         ZFS_LINUX_TRY_COMPILE([
31                 #include <linux/fs.h>
32
33                 long test_fallocate(struct inode *inode, int mode,
34                     loff_t offset, loff_t len) { return 0; }
35
36                 static const struct inode_operations
37                     fops __attribute__ ((unused)) = {
38                         .fallocate = test_fallocate,
39                 };
40         ],[
41         ],[
42                 AC_MSG_RESULT(yes)
43                 AC_DEFINE(HAVE_INODE_FALLOCATE, 1, [fops->fallocate() exists])
44         ],[
45                 AC_MSG_RESULT(no)
46         ])
47 ])
48
49 dnl #
50 dnl # The fallocate callback was moved from the inode_operations
51 dnl # structure to the file_operations structure.
52 dnl #
53 AC_DEFUN([ZFS_AC_KERNEL_FALLOCATE], [
54         ZFS_AC_KERNEL_FILE_FALLOCATE
55         ZFS_AC_KERNEL_INODE_FALLOCATE
56 ])