From 1b03c5bf41222b723415638f03e00ed12cac076a Mon Sep 17 00:00:00 2001
From: pjd <pjd@FreeBSD.org>
Date: Sun, 27 Feb 2011 19:41:40 +0000
Subject: Finally... Import the latest open-source ZFS version - (SPA) 28.

Few new things available from now on:

- Data deduplication.
- Triple parity RAIDZ (RAIDZ3).
- zfs diff.
- zpool split.
- Snapshot holds.
- zpool import -F. Allows to rewind corrupted pool to earlier
  transaction group.
- Possibility to import pool in read-only mode.

MFC after:	1 month
---
 .../compat/opensolaris/kern/opensolaris_misc.c     | 38 ++++++----------------
 1 file changed, 10 insertions(+), 28 deletions(-)

(limited to 'sys/cddl/compat/opensolaris/kern/opensolaris_misc.c')

diff --git a/sys/cddl/compat/opensolaris/kern/opensolaris_misc.c b/sys/cddl/compat/opensolaris/kern/opensolaris_misc.c
index 4ac666d..595f3c0 100644
--- a/sys/cddl/compat/opensolaris/kern/opensolaris_misc.c
+++ b/sys/cddl/compat/opensolaris/kern/opensolaris_misc.c
@@ -33,40 +33,22 @@ __FBSDID("$FreeBSD$");
 #include <sys/libkern.h>
 #include <sys/limits.h>
 #include <sys/misc.h>
-#include <sys/sunddi.h>
+#include <sys/sysctl.h>
 
 char hw_serial[11] = "0";
 
 struct opensolaris_utsname utsname = {
-	.nodename = "unset",
-	.sysname  = "SunOS"
+	.machine = MACHINE
 };
 
-int
-ddi_strtol(const char *str, char **nptr, int base, long *result)
+static void
+opensolaris_utsname_init(void *arg)
 {
 
-	*result = strtol(str, nptr, base);
-	if (*result == 0)
-		return (EINVAL);
-	else if (*result == LONG_MIN || *result == LONG_MAX)
-		return (ERANGE);
-	return (0);
-}
-
-int
-ddi_strtoul(const char *str, char **nptr, int base, unsigned long *result)
-{
-
-	if (str == hw_serial) {
-		*result = prison0.pr_hostid;
-		return (0);
-	}
-
-	*result = strtoul(str, nptr, base);
-	if (*result == 0)
-		return (EINVAL);
-	else if (*result == ULONG_MAX)
-		return (ERANGE);
-	return (0);
+	utsname.sysname = ostype;
+	utsname.nodename = prison0.pr_hostname;
+	utsname.release = osrelease;
+	snprintf(utsname.version, sizeof(utsname.version), "%d", osreldate);
 }
+SYSINIT(opensolaris_utsname_init, SI_SUB_TUNABLES, SI_ORDER_ANY,
+    opensolaris_utsname_init, NULL);
-- 
cgit v1.1