]>
Commit | Line | Data |
---|---|---|
c9c0d073 BB |
1 | dnl # |
2 | dnl # 2.6.x API change | |
3 | dnl # | |
4 | AC_DEFUN([ZFS_AC_KERNEL_BDEV_BLOCK_DEVICE_OPERATIONS], [ | |
5 | AC_MSG_CHECKING([block device operation prototypes]) | |
b9c59ec8 | 6 | tmp_flags="$EXTRA_KCFLAGS" |
e191b54e | 7 | EXTRA_KCFLAGS="${NO_UNUSED_BUT_SET_VARIABLE}" |
c9c0d073 BB |
8 | ZFS_LINUX_TRY_COMPILE([ |
9 | #include <linux/blkdev.h> | |
c38367c7 RY |
10 | |
11 | int blk_open(struct block_device *bdev, fmode_t mode) | |
12 | { return 0; } | |
13 | int blk_release(struct gendisk *g, fmode_t mode) { return 0; } | |
14 | int blk_ioctl(struct block_device *bdev, fmode_t mode, | |
15 | unsigned x, unsigned long y) { return 0; } | |
16 | int blk_compat_ioctl(struct block_device * bdev, fmode_t mode, | |
17 | unsigned x, unsigned long y) { return 0; } | |
18 | ||
19 | static const struct block_device_operations | |
20 | bops __attribute__ ((unused)) = { | |
c9c0d073 BB |
21 | .open = blk_open, |
22 | .release = blk_release, | |
23 | .ioctl = blk_ioctl, | |
24 | .compat_ioctl = blk_compat_ioctl, | |
25 | }; | |
c38367c7 | 26 | ],[ |
c9c0d073 BB |
27 | ],[ |
28 | AC_MSG_RESULT(struct block_device) | |
29 | AC_DEFINE(HAVE_BDEV_BLOCK_DEVICE_OPERATIONS, 1, | |
30 | [struct block_device_operations use bdevs]) | |
31 | ],[ | |
32 | AC_MSG_RESULT(struct inode) | |
33 | ]) | |
b9c59ec8 | 34 | EXTRA_KCFLAGS="$tmp_flags" |
c9c0d073 | 35 | ]) |