libspl: move utsname() etc to sys/misc.h; initialise in libspl_init()

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rob Norris <robn@despairlabs.com>
Closes #17861
This commit is contained in:
Rob Norris
2025-10-24 23:39:20 +11:00
committed by Brian Behlendorf
parent 6cf6f091cf
commit daff6b7e35
5 changed files with 54 additions and 14 deletions
-10
View File
@@ -44,7 +44,6 @@
#include <sys/systeminfo.h>
#include <sys/time.h>
#include <sys/tsd.h>
#include <sys/utsname.h>
#include <libspl.h>
#include <libzpool.h>
@@ -61,7 +60,6 @@
*/
uint32_t hostid;
struct utsname hw_utsname;
/* If set, all blocks read will be copied to the specified directory. */
char *vn_dumpdir = NULL;
@@ -405,12 +403,6 @@ ddi_strtoull(const char *str, char **nptr, int base, u_longlong_t *result)
return (0);
}
utsname_t *
utsname(void)
{
return (&hw_utsname);
}
/*
* =========================================================================
* kernel emulation setup & teardown
@@ -515,8 +507,6 @@ kernel_init(int mode)
random_init();
VERIFY0(uname(&hw_utsname));
system_taskq_init();
icp_init();