From dd50143ea1df2efc583755ddc74dfb1967be92c7 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 9 Jan 2009 11:21:59 -0800 Subject: [PATCH] Add module load/unload entry point hooks and ioctl integration --- module/zfs/zfs_ioctl.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/module/zfs/zfs_ioctl.c b/module/zfs/zfs_ioctl.c index b77ee4da38..b10033fd15 100644 --- a/module/zfs/zfs_ioctl.c +++ b/module/zfs/zfs_ioctl.c @@ -3101,15 +3101,27 @@ static struct dev_ops zfs_dev_ops = { }; static struct modldrv zfs_modldrv = { +#ifdef HAVE_SPL + NULL, +#else &mod_driverops, +#endif /* HAVE_SPL */ "ZFS storage pool", &zfs_dev_ops }; static struct modlinkage modlinkage = { MODREV_1, +#ifdef HAVE_ZPL (void *)&zfs_modlfs, +#else + NULL, +#endif /* HAVE_ZPL */ (void *)&zfs_modldrv, +#ifdef HAVE_SPL + ZFS_MAJOR, + ZFS_MINORS, +#endif /* HAVE_SPL */ NULL }; @@ -3172,8 +3184,17 @@ _fini(void) return (error); } +#ifdef HAVE_SPL +module_init(_init); +module_exit(_fini); + +MODULE_AUTHOR("Sun Microsystems, Inc"); +MODULE_DESCRIPTION("ZFS"); +MODULE_LICENSE("CDDL"); +#else int _info(struct modinfo *modinfop) { return (mod_info(&modlinkage, modinfop)); } +#endif /* HAVE_SPL */