--- old/usr/src/cmd/fm/fmdump/Makefile.com	Tue Jan 29 05:16:04 2013
+++ new/usr/src/cmd/fm/fmdump/Makefile.com	Tue Jan 29 05:16:04 2013
@@ -20,7 +20,6 @@
 #
 #
 # Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
-# Copyright (c) 2013, Joyent, Inc. All rights reserved.
 #
 
 .KEEP_STATE:
--- old/usr/src/cmd/fm/fmdump/common/nvlrender.c	Tue Jan 29 05:16:04 2013
+++ new/usr/src/cmd/fm/fmdump/common/nvlrender.c	Tue Jan 29 05:16:04 2013
@@ -78,11 +78,14 @@
  * Thin wrapper around libnvpair's inbuilt JSON routine.  Simply dumps the
  * entire log record nvlist without any reformatting.
  */
+
+/*ARGSUSED*/
 int
 fmdump_print_json(fmd_log_t *lp, const fmd_log_record_t *rp, FILE *fp)
 {
-	nvlist_print_json(fp, rp->rec_nvl);
-	fprintf(fp, "\n");
+	if (nvlist_print_json(fp, rp->rec_nvl) || fprintf(fp, "\n") < 0 ||
+	    fflush(fp) != 0)
+		return (-1);
 
 	return (0);
 }
--- old/usr/src/common/nvpair/fnvpair.c	Tue Jan 29 05:16:04 2013
+++ new/usr/src/common/nvpair/fnvpair.c	Tue Jan 29 05:16:04 2013
@@ -21,6 +21,7 @@
 
 /*
  * Copyright (c) 2012 by Delphix. All rights reserved.
+ * Copyright (c) 2013, Joyent, Inc. All rights reserved.
  */
 
 #include <sys/nvpair.h>
@@ -30,6 +31,9 @@
 #include <stdlib.h>
 #endif
 
+#pragma weak fnvlist_lookup_uint8_t = fnvlist_lookup_uint8
+#pragma weak fnvpair_value_uint8_t = fnvpair_value_uint8
+
 /*
  * "Force" nvlist wrapper.
  *
@@ -352,7 +356,7 @@
 }
 
 uint8_t
-fnvlist_lookup_uint8_t(nvlist_t *nvl, const char *name)
+fnvlist_lookup_uint8(nvlist_t *nvl, const char *name)
 {
 	uint8_t rv;
 	VERIFY0(nvlist_lookup_uint8(nvl, name, &rv));
@@ -448,7 +452,7 @@
 }
 
 uint8_t
-fnvpair_value_uint8_t(nvpair_t *nvp)
+fnvpair_value_uint8(nvpair_t *nvp)
 {
 	uint8_t rv;
 	VERIFY0(nvpair_value_uint8(nvp, &rv));
@@ -494,3 +498,19 @@
 	VERIFY0(nvpair_value_nvlist(nvp, &rv));
 	return (rv);
 }
+
+double
+fnvpair_value_double(nvpair_t *nvp)
+{
+	double rv;
+	VERIFY0(nvpair_value_double(nvp, &rv));
+	return (rv);
+}
+
+hrtime_t
+fnvpair_value_hrtime(nvpair_t *nvp)
+{
+	hrtime_t rv;
+	VERIFY0(nvpair_value_hrtime(nvp, &rv));
+	return (rv);
+}
--- old/usr/src/lib/libnvpair/Makefile.com	Tue Jan 29 05:16:04 2013
+++ new/usr/src/lib/libnvpair/Makefile.com	Tue Jan 29 05:16:04 2013
@@ -57,7 +57,13 @@
 
 # turn off warning caused by lint bug: not understanding SCNi8 "hhi"
 LINTFLAGS +=	-erroff=E_BAD_FORMAT_STR2
+LINTFLAGS +=	-erroff=E_INVALID_TOKEN_IN_DEFINE_MACRO
+LINTFLAGS +=	-erroff=E_RET_INT_IMPLICITLY
+LINTFLAGS +=	-erroff=E_FUNC_USED_VAR_ARG2
 LINTFLAGS64 +=	-erroff=E_BAD_FORMAT_STR2
+LINTFLAGS64 +=	-erroff=E_INVALID_TOKEN_IN_DEFINE_MACRO
+LINTFLAGS64 +=	-erroff=E_RET_INT_IMPLICITLY
+LINTFLAGS64 +=	-erroff=E_FUNC_USED_VAR_ARG2
 
 CERRWARN +=	-_gcc=-Wno-type-limits
 CERRWARN +=	-_gcc=-Wno-parentheses
--- old/usr/src/lib/libnvpair/libnvpair.h	Tue Jan 29 05:16:04 2013
+++ new/usr/src/lib/libnvpair/libnvpair.h	Tue Jan 29 05:16:04 2013
@@ -47,7 +47,7 @@
     char **);
 
 extern void nvlist_print(FILE *, nvlist_t *);
-extern void nvlist_print_json(FILE *, nvlist_t *);
+extern int nvlist_print_json(FILE *, nvlist_t *);
 extern void dump_nvlist(nvlist_t *, int);
 
 /*
--- old/usr/src/lib/libnvpair/mapfile-vers	Tue Jan 29 05:16:05 2013
+++ new/usr/src/lib/libnvpair/mapfile-vers	Tue Jan 29 05:16:05 2013
@@ -40,6 +40,13 @@
 
 $mapfile_version 2
 
+SYMBOL_VERSION ILLUMOS_0.2 {
+    fnvlist_lookup_uint8;
+    fnvpair_value_double;
+    fnvpair_value_hrtime;
+    fnvpair_value_uint8;
+} ILLUMOS_0.1;
+
 SYMBOL_VERSION ILLUMOS_0.1 {	# Illumos additions
     global:
     fnvlist_alloc;
--- old/usr/src/lib/libnvpair/nvpair_json.c	Tue Jan 29 05:16:05 2013
+++ new/usr/src/lib/libnvpair/nvpair_json.c	Tue Jan 29 05:16:05 2013
@@ -13,63 +13,113 @@
  */
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <strings.h>
+#include <wchar.h>
+#include <sys/debug.h>
 
 #include "libnvpair.h"
 
+#define	FPRINTF(fp, ...)				\
+	do {						\
+		if (fprintf(fp, __VA_ARGS__) < 0)	\
+			return (-1);			\
+	} while (0)
+
 /*
  * When formatting a string for JSON output we must escape certain characters,
  * as described in RFC4627.  This applies to both member names and
  * DATA_TYPE_STRING values.
+ *
+ * This function will only operate correctly if the following conditions are
+ * met:
+ *
+ *       1. The input String is encoded in the current locale.
+ *
+ *       2. The current locale includes the Basic Multilingual Plane (plane 0)
+ *          as defined in the Unicode standard.
+ *
+ * The output will be entirely 7-bit ASCII (as a subset of UTF-8) with all
+ * representable Unicode characters included in their escaped numeric form.
  */
-static void
+static int
 nvlist_print_json_string(FILE *fp, const char *input)
 {
-	char c;
+	mbstate_t mbr;
+	wchar_t c;
+	size_t sz;
 
-	fprintf(fp, "\"");
-	while ((c = *input++) != '\0') {
+	bzero(&mbr, sizeof (mbr));
+
+	FPRINTF(fp, "\"");
+	while ((sz = mbrtowc(&c, input, MB_CUR_MAX, &mbr)) > 0) {
 		switch (c) {
 		case '"':
-			fprintf(fp, "\\\"");
+			FPRINTF(fp, "\\\"");
 			break;
 		case '\n':
-			fprintf(fp, "\\n");
+			FPRINTF(fp, "\\n");
 			break;
 		case '\r':
-			fprintf(fp, "\\r");
+			FPRINTF(fp, "\\r");
 			break;
 		case '\\':
-			fprintf(fp, "\\\\");
+			FPRINTF(fp, "\\\\");
 			break;
 		case '\f':
-			fprintf(fp, "\\f");
+			FPRINTF(fp, "\\f");
 			break;
 		case '\t':
-			fprintf(fp, "\\t");
+			FPRINTF(fp, "\\t");
 			break;
 		case '\b':
-			fprintf(fp, "\\b");
+			FPRINTF(fp, "\\b");
 			break;
 		default:
-			if (c >= 0x00 && c <= 0x1f) {
-				fprintf(fp, "\\u00%02hhu", c);
-			} else {
-				fprintf(fp, "%c", c);
+			if ((c >= 0x00 && c <= 0x1f) ||
+			    (c > 0x7f && c <= 0xffff)) {
+				/*
+				 * Render both Control Characters and Unicode
+				 * characters in the Basic Multilingual Plane
+				 * as JSON-escaped multibyte characters.
+				 */
+				FPRINTF(fp, "\\u%04x", 0xffff & c);
+			} else if (c >= 0x20 && c <= 0x7f) {
+				/*
+				 * Render other 7-bit ASCII characters directly
+				 * and drop other, unrepresentable characters.
+				 */
+				FPRINTF(fp, "%c", 0xff & c);
 			}
 			break;
 		}
+		input += sz;
 	}
-	fprintf(fp, "\"");
+
+	if (sz == (size_t)-1 || sz == (size_t)-2) {
+		/*
+		 * We last read an invalid multibyte character sequence,
+		 * so return an error.
+		 */
+		return (-1);
+	}
+
+	FPRINTF(fp, "\"");
+	return (0);
 }
 
-void
+/*
+ * Dump a JSON-formatted representation of an nvlist to the provided FILE *.
+ * This routine does not output any new-lines or additional whitespace other
+ * than that contained in strings, nor does it call fflush(3C).
+ */
+int
 nvlist_print_json(FILE *fp, nvlist_t *nvl)
 {
 	nvpair_t *curr;
 	boolean_t first = B_TRUE;
 
-	fprintf(fp, "{");
+	FPRINTF(fp, "{");
 
 	for (curr = nvlist_next_nvpair(nvl, NULL); curr;
 	    curr = nvlist_next_nvpair(nvl, curr)) {
@@ -76,292 +126,271 @@
 		data_type_t type = nvpair_type(curr);
 
 		if (!first)
-			fprintf(fp, ",");
+			FPRINTF(fp, ",");
 		else
 			first = B_FALSE;
 
-		nvlist_print_json_string(fp, nvpair_name(curr));
-		fprintf(fp, ":");
+		if (nvlist_print_json_string(fp, nvpair_name(curr)) == -1)
+			return (-1);
+		FPRINTF(fp, ":");
 
 		switch (type) {
 		case DATA_TYPE_STRING: {
-			char *string;
-			nvpair_value_string(curr, &string);
-			nvlist_print_json_string(fp, string);
+			char *string = fnvpair_value_string(curr);
+			if (nvlist_print_json_string(fp, string) == -1)
+				return (-1);
 			break;
 		}
 
 		case DATA_TYPE_BOOLEAN: {
-			fprintf(fp, "true");
+			FPRINTF(fp, "true");
 			break;
 		}
 
 		case DATA_TYPE_BOOLEAN_VALUE: {
-			boolean_t boolean;
-			nvpair_value_boolean_value(curr, &boolean);
-			fprintf(fp, "%s", boolean == B_TRUE ? "true" :
-			    "false");
+			FPRINTF(fp, "%s", fnvpair_value_boolean_value(curr) ==
+			    B_TRUE ? "true" : "false");
 			break;
 		}
 
 		case DATA_TYPE_BYTE: {
-			uchar_t val;
-			nvpair_value_byte(curr, &val);
-			fprintf(fp, "%hhu", val);
+			FPRINTF(fp, "%hhu", fnvpair_value_byte(curr));
 			break;
 		}
 
 		case DATA_TYPE_INT8: {
-			int8_t val;
-			nvpair_value_int8(curr, &val);
-			fprintf(fp, "%hhd", val);
+			FPRINTF(fp, "%hhd", fnvpair_value_int8(curr));
 			break;
 		}
 
 		case DATA_TYPE_UINT8: {
-			uint8_t val;
-			nvpair_value_uint8(curr, &val);
-			fprintf(fp, "%hhu", val);
+			FPRINTF(fp, "%hhu", fnvpair_value_uint8(curr));
 			break;
 		}
 
 		case DATA_TYPE_INT16: {
-			int16_t val;
-			nvpair_value_int16(curr, &val);
-			fprintf(fp, "%hd", val);
+			FPRINTF(fp, "%hd", fnvpair_value_int16(curr));
 			break;
 		}
 
 		case DATA_TYPE_UINT16: {
-			uint16_t val;
-			nvpair_value_uint16(curr, &val);
-			fprintf(fp, "%hu", val);
+			FPRINTF(fp, "%hu", fnvpair_value_uint16(curr));
 			break;
 		}
 
 		case DATA_TYPE_INT32: {
-			int32_t val;
-			nvpair_value_int32(curr, &val);
-			fprintf(fp, "%d", val);
+			FPRINTF(fp, "%d", fnvpair_value_int32(curr));
 			break;
 		}
 
 		case DATA_TYPE_UINT32: {
-			uint32_t val;
-			nvpair_value_uint32(curr, &val);
-			fprintf(fp, "%u", val);
+			FPRINTF(fp, "%u", fnvpair_value_uint32(curr));
 			break;
 		}
 
 		case DATA_TYPE_INT64: {
-			int64_t val;
-			nvpair_value_int64(curr, &val);
-			fprintf(fp, "%lld", val);
+			FPRINTF(fp, "%lld", fnvpair_value_int64(curr));
 			break;
 		}
 
 		case DATA_TYPE_UINT64: {
-			uint64_t val;
-			nvpair_value_uint64(curr, &val);
-			fprintf(fp, "%llu", val);
+			FPRINTF(fp, "%llu", fnvpair_value_uint64(curr));
 			break;
 		}
 
 		case DATA_TYPE_HRTIME: {
-			hrtime_t val;
-			nvpair_value_hrtime(curr, &val);
-			fprintf(fp, "%llu", val);
+			FPRINTF(fp, "%llu", fnvpair_value_hrtime(curr));
 			break;
 		}
 
 		case DATA_TYPE_DOUBLE: {
-			double val;
-			nvpair_value_double(curr, &val);
-			fprintf(fp, "%f", val);
+			FPRINTF(fp, "%f", fnvpair_value_double(curr));
 			break;
 		}
 
 		case DATA_TYPE_NVLIST: {
-			nvlist_t *val;
-			nvpair_value_nvlist(curr, &val);
-			nvlist_print_json(fp, val);
+			if (nvlist_print_json(fp,
+			    fnvpair_value_nvlist(curr)) == -1)
+				return (-1);
 			break;
 		}
 
 		case DATA_TYPE_STRING_ARRAY: {
 			char **val;
-			uint_t valsz, pos;
-			nvpair_value_string_array(curr, &val, &valsz);
-			fprintf(fp, "[");
-			for (pos = 0; pos < valsz; pos++) {
-				if (pos > 0)
-					fprintf(fp, ",");
-				nvlist_print_json_string(fp, val[pos]);
+			uint_t valsz, i;
+			VERIFY0(nvpair_value_string_array(curr, &val, &valsz));
+			FPRINTF(fp, "[");
+			for (i = 0; i < valsz; i++) {
+				if (i > 0)
+					FPRINTF(fp, ",");
+				if (nvlist_print_json_string(fp, val[i]) == -1)
+					return (-1);
 			}
-			fprintf(fp, "]");
+			FPRINTF(fp, "]");
 			break;
 		}
 
 		case DATA_TYPE_NVLIST_ARRAY: {
 			nvlist_t **val;
-			uint_t valsz, pos;
-			nvpair_value_nvlist_array(curr, &val, &valsz);
-			fprintf(fp, "[");
-			for (pos = 0; pos < valsz; pos++) {
-				if (pos > 0)
-					fprintf(fp, ",");
-				nvlist_print_json(fp, val[pos]);
+			uint_t valsz, i;
+			VERIFY0(nvpair_value_nvlist_array(curr, &val, &valsz));
+			FPRINTF(fp, "[");
+			for (i = 0; i < valsz; i++) {
+				if (i > 0)
+					FPRINTF(fp, ",");
+				if (nvlist_print_json(fp, val[i]) == -1)
+					return (-1);
 			}
-			fprintf(fp, "]");
+			FPRINTF(fp, "]");
 			break;
 		}
 
 		case DATA_TYPE_BOOLEAN_ARRAY: {
 			boolean_t *val;
-			uint_t valsz, pos;
-			nvpair_value_boolean_array(curr, &val, &valsz);
-			fprintf(fp, "[");
-			for (pos = 0; pos < valsz; pos++) {
-				if (pos > 0)
-					fprintf(fp, ",");
-				fprintf(fp, val[pos] == B_TRUE ?
+			uint_t valsz, i;
+			VERIFY0(nvpair_value_boolean_array(curr, &val, &valsz));
+			FPRINTF(fp, "[");
+			for (i = 0; i < valsz; i++) {
+				if (i > 0)
+					FPRINTF(fp, ",");
+				FPRINTF(fp, val[i] == B_TRUE ?
 				    "true" : "false");
 			}
-			fprintf(fp, "]");
+			FPRINTF(fp, "]");
 			break;
 		}
 
 		case DATA_TYPE_BYTE_ARRAY: {
 			uchar_t *val;
-			uint_t valsz, pos;
-			nvpair_value_byte_array(curr, &val, &valsz);
-			fprintf(fp, "[");
-			for (pos = 0; pos < valsz; pos++) {
-				if (pos > 0)
-					fprintf(fp, ",");
-				fprintf(fp, "%hhu", val[pos]);
+			uint_t valsz, i;
+			VERIFY0(nvpair_value_byte_array(curr, &val, &valsz));
+			FPRINTF(fp, "[");
+			for (i = 0; i < valsz; i++) {
+				if (i > 0)
+					FPRINTF(fp, ",");
+				FPRINTF(fp, "%hhu", val[i]);
 			}
-			fprintf(fp, "]");
+			FPRINTF(fp, "]");
 			break;
 		}
 
 		case DATA_TYPE_UINT8_ARRAY: {
 			uint8_t *val;
-			uint_t valsz, pos;
-			nvpair_value_uint8_array(curr, &val, &valsz);
-			fprintf(fp, "[");
-			for (pos = 0; pos < valsz; pos++) {
-				if (pos > 0)
-					fprintf(fp, ",");
-				fprintf(fp, "%hhu", val[pos]);
+			uint_t valsz, i;
+			VERIFY0(nvpair_value_uint8_array(curr, &val, &valsz));
+			FPRINTF(fp, "[");
+			for (i = 0; i < valsz; i++) {
+				if (i > 0)
+					FPRINTF(fp, ",");
+				FPRINTF(fp, "%hhu", val[i]);
 			}
-			fprintf(fp, "]");
+			FPRINTF(fp, "]");
 			break;
 		}
 
 		case DATA_TYPE_INT8_ARRAY: {
 			int8_t *val;
-			uint_t valsz, pos;
-			nvpair_value_int8_array(curr, &val, &valsz);
-			fprintf(fp, "[");
-			for (pos = 0; pos < valsz; pos++) {
-				if (pos > 0)
-					fprintf(fp, ",");
-				fprintf(fp, "%hd", val[pos]);
+			uint_t valsz, i;
+			VERIFY0(nvpair_value_int8_array(curr, &val, &valsz));
+			FPRINTF(fp, "[");
+			for (i = 0; i < valsz; i++) {
+				if (i > 0)
+					FPRINTF(fp, ",");
+				FPRINTF(fp, "%hd", val[i]);
 			}
-			fprintf(fp, "]");
+			FPRINTF(fp, "]");
 			break;
 		}
 
 		case DATA_TYPE_UINT16_ARRAY: {
 			uint16_t *val;
-			uint_t valsz, pos;
-			nvpair_value_uint16_array(curr, &val, &valsz);
-			fprintf(fp, "[");
-			for (pos = 0; pos < valsz; pos++) {
-				if (pos > 0)
-					fprintf(fp, ",");
-				fprintf(fp, "%hu", val[pos]);
+			uint_t valsz, i;
+			VERIFY0(nvpair_value_uint16_array(curr, &val, &valsz));
+			FPRINTF(fp, "[");
+			for (i = 0; i < valsz; i++) {
+				if (i > 0)
+					FPRINTF(fp, ",");
+				FPRINTF(fp, "%hu", val[i]);
 			}
-			fprintf(fp, "]");
+			FPRINTF(fp, "]");
 			break;
 		}
 
 		case DATA_TYPE_INT16_ARRAY: {
 			int16_t *val;
-			uint_t valsz, pos;
-			nvpair_value_int16_array(curr, &val, &valsz);
-			fprintf(fp, "[");
-			for (pos = 0; pos < valsz; pos++) {
-				if (pos > 0)
-					fprintf(fp, ",");
-				fprintf(fp, "%hhd", val[pos]);
+			uint_t valsz, i;
+			VERIFY0(nvpair_value_int16_array(curr, &val, &valsz));
+			FPRINTF(fp, "[");
+			for (i = 0; i < valsz; i++) {
+				if (i > 0)
+					FPRINTF(fp, ",");
+				FPRINTF(fp, "%hhd", val[i]);
 			}
-			fprintf(fp, "]");
+			FPRINTF(fp, "]");
 			break;
 		}
 
 		case DATA_TYPE_UINT32_ARRAY: {
 			uint32_t *val;
-			uint_t valsz, pos;
-			nvpair_value_uint32_array(curr, &val, &valsz);
-			fprintf(fp, "[");
-			for (pos = 0; pos < valsz; pos++) {
-				if (pos > 0)
-					fprintf(fp, ",");
-				fprintf(fp, "%u", val[pos]);
+			uint_t valsz, i;
+			VERIFY0(nvpair_value_uint32_array(curr, &val, &valsz));
+			FPRINTF(fp, "[");
+			for (i = 0; i < valsz; i++) {
+				if (i > 0)
+					FPRINTF(fp, ",");
+				FPRINTF(fp, "%u", val[i]);
 			}
-			fprintf(fp, "]");
+			FPRINTF(fp, "]");
 			break;
 		}
 
 		case DATA_TYPE_INT32_ARRAY: {
 			int32_t *val;
-			uint_t valsz, pos;
-			nvpair_value_int32_array(curr, &val, &valsz);
-			fprintf(fp, "[");
-			for (pos = 0; pos < valsz; pos++) {
-				if (pos > 0)
-					fprintf(fp, ",");
-				fprintf(fp, "%d", val[pos]);
+			uint_t valsz, i;
+			VERIFY0(nvpair_value_int32_array(curr, &val, &valsz));
+			FPRINTF(fp, "[");
+			for (i = 0; i < valsz; i++) {
+				if (i > 0)
+					FPRINTF(fp, ",");
+				FPRINTF(fp, "%d", val[i]);
 			}
-			fprintf(fp, "]");
+			FPRINTF(fp, "]");
 			break;
 		}
 
 		case DATA_TYPE_UINT64_ARRAY: {
 			uint64_t *val;
-			uint_t valsz, pos;
-			nvpair_value_uint64_array(curr, &val, &valsz);
-			fprintf(fp, "[");
-			for (pos = 0; pos < valsz; pos++) {
-				if (pos > 0)
-					fprintf(fp, ",");
-				fprintf(fp, "%llu", val[pos]);
+			uint_t valsz, i;
+			VERIFY0(nvpair_value_uint64_array(curr, &val, &valsz));
+			FPRINTF(fp, "[");
+			for (i = 0; i < valsz; i++) {
+				if (i > 0)
+					FPRINTF(fp, ",");
+				FPRINTF(fp, "%llu", val[i]);
 			}
-			fprintf(fp, "]");
+			FPRINTF(fp, "]");
 			break;
 		}
 
 		case DATA_TYPE_INT64_ARRAY: {
 			int64_t *val;
-			uint_t valsz, pos;
-			nvpair_value_int64_array(curr, &val, &valsz);
-			fprintf(fp, "[");
-			for (pos = 0; pos < valsz; pos++) {
-				if (pos > 0)
-					fprintf(fp, ",");
-				fprintf(fp, "%lld", val[pos]);
+			uint_t valsz, i;
+			VERIFY0(nvpair_value_int64_array(curr, &val, &valsz));
+			FPRINTF(fp, "[");
+			for (i = 0; i < valsz; i++) {
+				if (i > 0)
+					FPRINTF(fp, ",");
+				FPRINTF(fp, "%lld", val[i]);
 			}
-			fprintf(fp, "]");
+			FPRINTF(fp, "]");
 			break;
 		}
 
 		case DATA_TYPE_UNKNOWN:
-			fprintf(fp, "null");
-			break;
+			return (-1);
 		}
 	}
 
-	fprintf(fp, "}");
+	FPRINTF(fp, "}");
+	return (0);
 }
--- old/usr/src/uts/common/sys/nvpair.h	Tue Jan 29 05:16:05 2013
+++ new/usr/src/uts/common/sys/nvpair.h	Tue Jan 29 05:16:05 2013
@@ -21,6 +21,7 @@
 /*
  * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2012 by Delphix. All rights reserved.
+ * Copyright (c) 2013, Joyent, Inc. All rights reserved.
  */
 
 #ifndef	_SYS_NVPAIR_H
@@ -323,7 +324,7 @@
 int16_t fnvlist_lookup_int16(nvlist_t *nvl, const char *name);
 int32_t fnvlist_lookup_int32(nvlist_t *nvl, const char *name);
 int64_t fnvlist_lookup_int64(nvlist_t *nvl, const char *name);
-uint8_t fnvlist_lookup_uint8_t(nvlist_t *nvl, const char *name);
+uint8_t fnvlist_lookup_uint8(nvlist_t *nvl, const char *name);
 uint16_t fnvlist_lookup_uint16(nvlist_t *nvl, const char *name);
 uint32_t fnvlist_lookup_uint32(nvlist_t *nvl, const char *name);
 uint64_t fnvlist_lookup_uint64(nvlist_t *nvl, const char *name);
@@ -336,12 +337,16 @@
 int16_t fnvpair_value_int16(nvpair_t *nvp);
 int32_t fnvpair_value_int32(nvpair_t *nvp);
 int64_t fnvpair_value_int64(nvpair_t *nvp);
-uint8_t fnvpair_value_uint8_t(nvpair_t *nvp);
+uint8_t fnvpair_value_uint8(nvpair_t *nvp);
 uint16_t fnvpair_value_uint16(nvpair_t *nvp);
 uint32_t fnvpair_value_uint32(nvpair_t *nvp);
 uint64_t fnvpair_value_uint64(nvpair_t *nvp);
 char *fnvpair_value_string(nvpair_t *nvp);
 nvlist_t *fnvpair_value_nvlist(nvpair_t *nvp);
+hrtime_t fnvpair_value_hrtime(nvpair_t *);
+#if !defined(_KERNEL)
+double fnvpair_value_double(nvpair_t *);
+#endif
 
 #ifdef	__cplusplus
 }
