Add -p switch to "zpool get"
[zfs.git] / config / kernel-blk-end-request.m4
1 dnl #
2 dnl # 2.6.31 API change
3 dnl # In 2.6.29 kernels blk_end_request() was a GPL-only symbol, this was
4 dnl # changed in 2.6.31 so it may be used by non-GPL modules.
5 dnl #
6 AC_DEFUN([ZFS_AC_KERNEL_BLK_END_REQUEST], [
7         AC_MSG_CHECKING([whether blk_end_request() is available])
8         tmp_flags="$EXTRA_KCFLAGS"
9         EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
10         ZFS_LINUX_TRY_COMPILE([
11                 #include <linux/blkdev.h>
12         ],[
13                 struct request *req = NULL;
14                 (void) blk_end_request(req, 0, 0);
15         ],[
16                 AC_MSG_RESULT(yes)
17                 AC_DEFINE(HAVE_BLK_END_REQUEST, 1,
18                           [blk_end_request() is available])
19         ],[
20                 AC_MSG_RESULT(no)
21         ])
22
23         AC_MSG_CHECKING([whether blk_end_request() is GPL-only])
24         ZFS_LINUX_TRY_COMPILE([
25                 #include <linux/module.h>
26                 #include <linux/blkdev.h>
27                 
28                 MODULE_LICENSE("CDDL");
29         ],[
30                 struct request *req = NULL;
31                 (void) blk_end_request(req, 0, 0);
32         ],[
33                 AC_MSG_RESULT(no)
34         ],[
35                 AC_MSG_RESULT(yes)
36                 AC_DEFINE(HAVE_BLK_END_REQUEST_GPL_ONLY, 1,
37                           [blk_end_request() is GPL-only])
38         ])
39         EXTRA_KCFLAGS="$tmp_flags"
40 ])