mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Make spa_history_zone platform-dependent in kernel
This function should only return "linux" on Linux. Move the kernel part of the function out of common code. Fix the tests for FreeBSD. Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes #10079
This commit is contained in:
@@ -102,3 +102,9 @@ param_set_slop_shift(const char *buf, zfs_kernel_param_t *kp)
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
const char *
|
||||
spa_history_zone(void)
|
||||
{
|
||||
return ("linux");
|
||||
}
|
||||
|
||||
@@ -180,16 +180,6 @@ spa_history_write(spa_t *spa, void *buf, uint64_t len, spa_history_phys_t *shpp,
|
||||
return (0);
|
||||
}
|
||||
|
||||
static char *
|
||||
spa_history_zone(void)
|
||||
{
|
||||
#ifdef _KERNEL
|
||||
return ("linux");
|
||||
#else
|
||||
return (NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* Post a history sysevent.
|
||||
*
|
||||
@@ -622,6 +612,14 @@ spa_history_log_version(spa_t *spa, const char *operation, dmu_tx_t *tx)
|
||||
u->nodename, u->release, u->version, u->machine);
|
||||
}
|
||||
|
||||
#ifndef _KERNEL
|
||||
const char *
|
||||
spa_history_zone(void)
|
||||
{
|
||||
return (NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(_KERNEL)
|
||||
EXPORT_SYMBOL(spa_history_create_obj);
|
||||
EXPORT_SYMBOL(spa_history_get);
|
||||
|
||||
Reference in New Issue
Block a user