xref: /freebsd/sys/contrib/openzfs/config/kernel-genhd-flags.m4 (revision 7fdf597e96a02165cfe22ff357b857d5fa15ed8a)
1dnl #
2dnl # 5.17 API change,
3dnl #
4dnl # GENHD_FL_EXT_DEVT flag removed
5dnl # GENHD_FL_NO_PART_SCAN renamed GENHD_FL_NO_PART
6dnl #
7AC_DEFUN([ZFS_AC_KERNEL_SRC_GENHD_FLAGS], [
8
9	ZFS_LINUX_TEST_SRC([genhd_fl_ext_devt], [
10		#include <linux/blkdev.h>
11	], [
12		int flags __attribute__ ((unused)) = GENHD_FL_EXT_DEVT;
13	])
14
15	ZFS_LINUX_TEST_SRC([genhd_fl_no_part], [
16		#include <linux/blkdev.h>
17	], [
18		int flags __attribute__ ((unused)) = GENHD_FL_NO_PART;
19	])
20])
21
22AC_DEFUN([ZFS_AC_KERNEL_GENHD_FLAGS], [
23
24	AC_MSG_CHECKING([whether GENHD_FL_EXT_DEVT flag is available])
25	ZFS_LINUX_TEST_RESULT([genhd_fl_ext_devt], [
26		AC_MSG_RESULT(yes)
27		AC_DEFINE(HAVE_GENHD_FL_EXT_DEVT, 1,
28		    [GENHD_FL_EXT_DEVT flag is available])
29	], [
30		AC_MSG_RESULT(no)
31	])
32
33	AC_MSG_CHECKING([whether GENHD_FL_NO_PART flag is available])
34	ZFS_LINUX_TEST_RESULT([genhd_fl_no_part], [
35		AC_MSG_RESULT(yes)
36		AC_DEFINE(HAVE_GENHD_FL_NO_PART, 1,
37		    [GENHD_FL_NO_PART flag is available])
38	], [
39		AC_MSG_RESULT(no)
40	])
41])
42