Add -p switch to "zpool get"
[zfs.git] / config / kernel-bdev-logical-size.m4
1 dnl #
2 dnl # 2.6.30 API change
3 dnl # bdev_hardsect_size() replaced with bdev_logical_block_size().  While
4 dnl # it has been true for a while that there was no strict 1:1 mapping
5 dnl # between physical sector size and logical block size this change makes
6 dnl # it explicit.
7 dnl #
8 AC_DEFUN([ZFS_AC_KERNEL_BDEV_LOGICAL_BLOCK_SIZE], [
9         AC_MSG_CHECKING([whether bdev_logical_block_size() is available])
10         tmp_flags="$EXTRA_KCFLAGS"
11         EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
12         ZFS_LINUX_TRY_COMPILE([
13                 #include <linux/blkdev.h>
14         ],[
15                 struct block_device *bdev = NULL;
16                 bdev_logical_block_size(bdev);
17         ],[
18                 AC_MSG_RESULT(yes)
19                 AC_DEFINE(HAVE_BDEV_LOGICAL_BLOCK_SIZE, 1,
20                           [bdev_logical_block_size() is available])
21         ],[
22                 AC_MSG_RESULT(no)
23         ])
24         EXTRA_KCFLAGS="$tmp_flags"
25 ])