]> granicus.if.org Git - zfs/blob - config/kernel-get-disk-ro.m4
Add back iostat -y or -w descriptions
[zfs] / config / kernel-get-disk-ro.m4
1 dnl #
2 dnl # 2.6.x API change
3 dnl #
4 AC_DEFUN([ZFS_AC_KERNEL_GET_DISK_RO], [
5         AC_MSG_CHECKING([whether get_disk_ro() is available])
6         tmp_flags="$EXTRA_KCFLAGS"
7         EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}"
8         ZFS_LINUX_TRY_COMPILE([
9                 #include <linux/blkdev.h>
10         ],[
11                 struct gendisk *disk = NULL;
12                 (void) get_disk_ro(disk);
13         ],[
14                 AC_MSG_RESULT(yes)
15                 AC_DEFINE(HAVE_GET_DISK_RO, 1,
16                           [blk_disk_ro() is available])
17         ],[
18                 AC_MSG_RESULT(no)
19         ])
20         EXTRA_KCFLAGS="$tmp_flags"
21 ])