1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
dnl #
dnl # 5.17 API change,
dnl #
dnl # GENHD_FL_EXT_DEVT flag removed
dnl # GENHD_FL_NO_PART_SCAN renamed GENHD_FL_NO_PART
dnl #
AC_DEFUN([ZFS_AC_KERNEL_SRC_GENHD_FLAGS], [
ZFS_LINUX_TEST_SRC([genhd_fl_ext_devt], [
#include <linux/blkdev.h>
], [
int flags __attribute__ ((unused)) = GENHD_FL_EXT_DEVT;
])
ZFS_LINUX_TEST_SRC([genhd_fl_no_part], [
#include <linux/blkdev.h>
], [
int flags __attribute__ ((unused)) = GENHD_FL_NO_PART;
])
ZFS_LINUX_TEST_SRC([genhd_fl_no_part_scan], [
#include <linux/blkdev.h>
], [
int flags __attribute__ ((unused)) = GENHD_FL_NO_PART_SCAN;
])
])
AC_DEFUN([ZFS_AC_KERNEL_GENHD_FLAGS], [
AC_MSG_CHECKING([whether GENHD_FL_EXT_DEVT flag is available])
ZFS_LINUX_TEST_RESULT([genhd_fl_ext_devt], [
AC_MSG_RESULT(yes)
AC_DEFINE(ZFS_GENHD_FL_EXT_DEVT, GENHD_FL_EXT_DEVT,
[GENHD_FL_EXT_DEVT flag is available])
], [
AC_MSG_RESULT(no)
AC_DEFINE(ZFS_GENHD_FL_EXT_DEVT, 0,
[GENHD_FL_EXT_DEVT flag is not available])
])
AC_MSG_CHECKING([whether GENHD_FL_NO_PART flag is available])
ZFS_LINUX_TEST_RESULT([genhd_fl_no_part], [
AC_MSG_RESULT(yes)
AC_DEFINE(ZFS_GENHD_FL_NO_PART, GENHD_FL_NO_PART,
[GENHD_FL_NO_PART flag is available])
], [
AC_MSG_RESULT(no)
AC_MSG_CHECKING([whether GENHD_FL_NO_PART_SCAN flag is available])
ZFS_LINUX_TEST_RESULT([genhd_fl_no_part_scan], [
AC_MSG_RESULT(yes)
AC_DEFINE(ZFS_GENHD_FL_NO_PART, GENHD_FL_NO_PART_SCAN,
[GENHD_FL_NO_PART_SCAN flag is available])
], [
ZFS_LINUX_TEST_ERROR([GENHD_FL_NO_PART|GENHD_FL_NO_PART_SCAN])
])
])
])
|