xref: /freebsd/sys/contrib/openzfs/config/kernel-get-disk-ro.m4 (revision 7877fdebeeb35fad1cbbafce22598b1bdf97c786)
1dnl #
2dnl # 2.6.x API change
3dnl #
4AC_DEFUN([ZFS_AC_KERNEL_SRC_GET_DISK_RO], [
5	ZFS_LINUX_TEST_SRC([get_disk_ro], [
6		#include <linux/blkdev.h>
7	],[
8		struct gendisk *disk = NULL;
9		(void) get_disk_ro(disk);
10	], [$NO_UNUSED_BUT_SET_VARIABLE])
11])
12
13AC_DEFUN([ZFS_AC_KERNEL_GET_DISK_RO], [
14	AC_MSG_CHECKING([whether get_disk_ro() is available])
15	ZFS_LINUX_TEST_RESULT([get_disk_ro], [
16		AC_MSG_RESULT(yes)
17	],[
18		ZFS_LINUX_TEST_ERROR([get_disk_ro()])
19	])
20])
21