xref: /freebsd/sys/contrib/openzfs/config/kernel-fst-mount.m4 (revision e25152834cdf3b353892835a4f3b157e066a8ed4)
1*eda14cbcSMatt Macydnl #
2*eda14cbcSMatt Macydnl # 2.6.38 API change
3*eda14cbcSMatt Macydnl # The .get_sb callback has been replaced by a .mount callback
4*eda14cbcSMatt Macydnl # in the file_system_type structure.
5*eda14cbcSMatt Macydnl #
6*eda14cbcSMatt MacyAC_DEFUN([ZFS_AC_KERNEL_SRC_FST_MOUNT], [
7*eda14cbcSMatt Macy        ZFS_LINUX_TEST_SRC([file_system_type_mount], [
8*eda14cbcSMatt Macy                #include <linux/fs.h>
9*eda14cbcSMatt Macy
10*eda14cbcSMatt Macy                static struct dentry *
11*eda14cbcSMatt Macy                mount(struct file_system_type *fs_type, int flags,
12*eda14cbcSMatt Macy                    const char *osname, void *data) {
13*eda14cbcSMatt Macy                        struct dentry *d = NULL;
14*eda14cbcSMatt Macy                        return (d);
15*eda14cbcSMatt Macy                }
16*eda14cbcSMatt Macy
17*eda14cbcSMatt Macy                static struct file_system_type fst __attribute__ ((unused)) = {
18*eda14cbcSMatt Macy                        .mount = mount,
19*eda14cbcSMatt Macy                };
20*eda14cbcSMatt Macy        ],[])
21*eda14cbcSMatt Macy])
22*eda14cbcSMatt Macy
23*eda14cbcSMatt MacyAC_DEFUN([ZFS_AC_KERNEL_FST_MOUNT], [
24*eda14cbcSMatt Macy        AC_MSG_CHECKING([whether fst->mount() exists])
25*eda14cbcSMatt Macy        ZFS_LINUX_TEST_RESULT([file_system_type_mount], [
26*eda14cbcSMatt Macy                AC_MSG_RESULT(yes)
27*eda14cbcSMatt Macy        ],[
28*eda14cbcSMatt Macy		ZFS_LINUX_TEST_ERROR([fst->mount()])
29*eda14cbcSMatt Macy        ])
30*eda14cbcSMatt Macy])
31