diff --git a/lib/libzpool/include/sys/zfs_context.h b/lib/libzpool/include/sys/zfs_context.h index 5d1cacd4ff..6d0b65b689 100644 --- a/lib/libzpool/include/sys/zfs_context.h +++ b/lib/libzpool/include/sys/zfs_context.h @@ -58,6 +58,7 @@ extern "C" { #include #include #include +#include #include #include #include @@ -71,11 +72,8 @@ extern "C" { #include #include #include -#ifdef HAVE_SYSEVENT -#include #include #include -#endif /* HAVE_SYSEVENT */ /* * Stack diff --git a/module/zfs/include/sys/spa.h b/module/zfs/include/sys/spa.h index e8e0c92497..aba28dbb2d 100644 --- a/module/zfs/include/sys/spa.h +++ b/module/zfs/include/sys/spa.h @@ -534,11 +534,7 @@ extern void spa_prop_clear_bootfs(spa_t *spa, uint64_t obj, dmu_tx_t *tx); extern void spa_configfile_set(spa_t *, nvlist_t *, boolean_t); /* asynchronous event notification */ -#ifdef HAVE_SYSEVENT extern void spa_event_notify(spa_t *spa, vdev_t *vdev, const char *name); -#else -#define spa_event_notify(s,v,n) ((void)0) -#endif #ifdef ZFS_DEBUG #define dprintf_bp(bp, fmt, ...) do { \ diff --git a/module/zfs/include/sys/zfs_context.h b/module/zfs/include/sys/zfs_context.h index 29b88a37fa..2ce5c9da4d 100644 --- a/module/zfs/include/sys/zfs_context.h +++ b/module/zfs/include/sys/zfs_context.h @@ -58,11 +58,9 @@ extern "C" { #include #include #include -#ifdef HAVE_SYSEVENT #include #include #include -#endif /* HAVE_SYSEVENT */ #include #ifdef __cplusplus diff --git a/module/zfs/spa.c b/module/zfs/spa.c index 391290a76f..596fcf3e69 100644 --- a/module/zfs/spa.c +++ b/module/zfs/spa.c @@ -3721,11 +3721,9 @@ spa_async_probe(spa_t *spa, vdev_t *vd) static void spa_async_autoexpand(spa_t *spa, vdev_t *vd) { -#ifdef HAVE_SYSEVENT sysevent_id_t eid; nvlist_t *attr; char *physpath; -#endif int c; if (!spa->spa_autoexpand) @@ -3739,7 +3737,6 @@ spa_async_autoexpand(spa_t *spa, vdev_t *vd) if (!vd->vdev_ops->vdev_op_leaf || vd->vdev_physpath == NULL) return; -#ifdef HAVE_SYSEVENT physpath = kmem_zalloc(MAXPATHLEN, KM_SLEEP); (void) snprintf(physpath, MAXPATHLEN, "/devices%s", vd->vdev_physpath); @@ -3751,7 +3748,6 @@ spa_async_autoexpand(spa_t *spa, vdev_t *vd) nvlist_free(attr); kmem_free(physpath, MAXPATHLEN); -#endif } static void @@ -4521,10 +4517,10 @@ spa_has_active_shared_spare(spa_t *spa) * in the userland libzpool, as we don't want consumers to misinterpret ztest * or zdb as real changes. */ -#ifdef HAVE_SYSEVENT void spa_event_notify(spa_t *spa, vdev_t *vd, const char *name) { +#ifdef _KERNEL sysevent_t *ev; sysevent_attr_list_t *attr = NULL; sysevent_value_t value; @@ -4569,8 +4565,8 @@ done: if (attr) sysevent_free_attr(attr); sysevent_free(ev); +#endif } -#endif /* HAVE_SYSEVENT */ #if defined(_KERNEL) && defined(HAVE_SPL) /* state manipulation functions */