2013-01-28 22:15:39 +00:00
|
|
|
dnl #
|
2016-10-26 17:30:43 +00:00
|
|
|
dnl # 2.6.27, lookup_bdev() was exported.
|
|
|
|
dnl # 4.4.0-6.21 - x.y on Ubuntu, lookup_bdev() takes 2 arguments.
|
2013-01-28 22:15:39 +00:00
|
|
|
dnl #
|
2019-10-01 19:50:34 +00:00
|
|
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_LOOKUP_BDEV], [
|
|
|
|
ZFS_LINUX_TEST_SRC([lookup_bdev_1arg], [
|
2013-01-28 22:15:39 +00:00
|
|
|
#include <linux/fs.h>
|
2020-08-09 16:03:03 +00:00
|
|
|
#include <linux/blkdev.h>
|
2013-01-28 22:15:39 +00:00
|
|
|
], [
|
|
|
|
lookup_bdev(NULL);
|
2019-10-01 19:50:34 +00:00
|
|
|
])
|
|
|
|
|
|
|
|
ZFS_LINUX_TEST_SRC([lookup_bdev_2args], [
|
|
|
|
#include <linux/fs.h>
|
|
|
|
], [
|
|
|
|
lookup_bdev(NULL, FMODE_READ);
|
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_DEFUN([ZFS_AC_KERNEL_LOOKUP_BDEV], [
|
|
|
|
AC_MSG_CHECKING([whether lookup_bdev() wants 1 arg])
|
|
|
|
ZFS_LINUX_TEST_RESULT_SYMBOL([lookup_bdev_1arg],
|
|
|
|
[lookup_bdev], [fs/block_dev.c], [
|
2013-01-28 22:15:39 +00:00
|
|
|
AC_MSG_RESULT(yes)
|
2019-10-01 19:50:34 +00:00
|
|
|
AC_DEFINE(HAVE_1ARG_LOOKUP_BDEV, 1,
|
|
|
|
[lookup_bdev() wants 1 arg])
|
2013-01-28 22:15:39 +00:00
|
|
|
], [
|
|
|
|
AC_MSG_RESULT(no)
|
2019-10-01 19:50:34 +00:00
|
|
|
|
2016-10-26 17:30:43 +00:00
|
|
|
AC_MSG_CHECKING([whether lookup_bdev() wants 2 args])
|
2019-10-01 19:50:34 +00:00
|
|
|
ZFS_LINUX_TEST_RESULT_SYMBOL([lookup_bdev_2args],
|
|
|
|
[lookup_bdev], [fs/block_dev.c], [
|
2016-10-26 17:30:43 +00:00
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(HAVE_2ARGS_LOOKUP_BDEV, 1,
|
|
|
|
[lookup_bdev() wants 2 args])
|
|
|
|
], [
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
])
|
2013-01-28 22:15:39 +00:00
|
|
|
])
|
2019-10-01 19:50:34 +00:00
|
|
|
])
|