Print this page
OS-1840 fmdump shall emit JSON (copyright fixes 2)
OS-1840 fmdump shall emit JSON (rm feedback)

@@ -19,19 +19,23 @@
  * CDDL HEADER END
  */
 
 /*
  * Copyright (c) 2012 by Delphix. All rights reserved.
+ * Copyright (c) 2013, Joyent, Inc. All rights reserved.
  */
 
 #include <sys/nvpair.h>
 #include <sys/kmem.h>
 #include <sys/debug.h>
 #ifndef _KERNEL
 #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.
  *
  * These functions wrap the nvlist_* functions with assertions that assume
  * the operation is successful.  This allows the caller's code to be much

@@ -350,11 +354,11 @@
         VERIFY0(nvlist_lookup_int64(nvl, name, &rv));
         return (rv);
 }
 
 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));
         return (rv);
 }

@@ -446,11 +450,11 @@
         VERIFY0(nvpair_value_int64(nvp, &rv));
         return (rv);
 }
 
 uint8_t
-fnvpair_value_uint8_t(nvpair_t *nvp)
+fnvpair_value_uint8(nvpair_t *nvp)
 {
         uint8_t rv;
         VERIFY0(nvpair_value_uint8(nvp, &rv));
         return (rv);
 }

@@ -492,5 +496,21 @@
 {
         nvlist_t *rv;
         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);
+}