diff options
author | Ryan Moeller <[email protected]> | 2020-03-02 12:43:30 -0500 |
---|---|---|
committer | GitHub <[email protected]> | 2020-03-02 09:43:30 -0800 |
commit | 9bb907bc3fdcaa132ecb0f8326c8815f27824ce4 (patch) | |
tree | 21d6bca86ddbe51700cc3d78939f63b5ed565bd6 /module/zfs | |
parent | 1289fbb557e1f6d4de69a085280890619bc71127 (diff) |
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 <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ryan Moeller <[email protected]>
Closes #10079
Diffstat (limited to 'module/zfs')
-rw-r--r-- | module/zfs/spa_history.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/module/zfs/spa_history.c b/module/zfs/spa_history.c index 67847b6d1..f47adb94d 100644 --- a/module/zfs/spa_history.c +++ b/module/zfs/spa_history.c @@ -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); |