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


   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
  23  * Copyright (c) 2012 by Delphix. All rights reserved.

  24  */
  25 
  26 #ifndef _SYS_NVPAIR_H
  27 #define _SYS_NVPAIR_H
  28 
  29 #include <sys/types.h>
  30 #include <sys/time.h>
  31 #include <sys/errno.h>
  32 #include <sys/va_list.h>
  33 
  34 #if defined(_KERNEL) && !defined(_BOOT)
  35 #include <sys/kmem.h>
  36 #endif
  37 
  38 #ifdef  __cplusplus
  39 extern "C" {
  40 #endif
  41 
  42 typedef enum {
  43         DATA_TYPE_UNKNOWN = 0,


 306 void fnvlist_add_int16_array(nvlist_t *, const char *, int16_t *, uint_t);
 307 void fnvlist_add_uint16_array(nvlist_t *, const char *, uint16_t *, uint_t);
 308 void fnvlist_add_int32_array(nvlist_t *, const char *, int32_t *, uint_t);
 309 void fnvlist_add_uint32_array(nvlist_t *, const char *, uint32_t *, uint_t);
 310 void fnvlist_add_int64_array(nvlist_t *, const char *, int64_t *, uint_t);
 311 void fnvlist_add_uint64_array(nvlist_t *, const char *, uint64_t *, uint_t);
 312 void fnvlist_add_string_array(nvlist_t *, const char *, char * const *, uint_t);
 313 void fnvlist_add_nvlist_array(nvlist_t *, const char *, nvlist_t **, uint_t);
 314 
 315 void fnvlist_remove(nvlist_t *, const char *);
 316 void fnvlist_remove_nvpair(nvlist_t *, nvpair_t *);
 317 
 318 nvpair_t *fnvlist_lookup_nvpair(nvlist_t *nvl, const char *name);
 319 boolean_t fnvlist_lookup_boolean(nvlist_t *nvl, const char *name);
 320 boolean_t fnvlist_lookup_boolean_value(nvlist_t *nvl, const char *name);
 321 uchar_t fnvlist_lookup_byte(nvlist_t *nvl, const char *name);
 322 int8_t fnvlist_lookup_int8(nvlist_t *nvl, const char *name);
 323 int16_t fnvlist_lookup_int16(nvlist_t *nvl, const char *name);
 324 int32_t fnvlist_lookup_int32(nvlist_t *nvl, const char *name);
 325 int64_t fnvlist_lookup_int64(nvlist_t *nvl, const char *name);
 326 uint8_t fnvlist_lookup_uint8_t(nvlist_t *nvl, const char *name);
 327 uint16_t fnvlist_lookup_uint16(nvlist_t *nvl, const char *name);
 328 uint32_t fnvlist_lookup_uint32(nvlist_t *nvl, const char *name);
 329 uint64_t fnvlist_lookup_uint64(nvlist_t *nvl, const char *name);
 330 char *fnvlist_lookup_string(nvlist_t *nvl, const char *name);
 331 nvlist_t *fnvlist_lookup_nvlist(nvlist_t *nvl, const char *name);
 332 
 333 boolean_t fnvpair_value_boolean_value(nvpair_t *nvp);
 334 uchar_t fnvpair_value_byte(nvpair_t *nvp);
 335 int8_t fnvpair_value_int8(nvpair_t *nvp);
 336 int16_t fnvpair_value_int16(nvpair_t *nvp);
 337 int32_t fnvpair_value_int32(nvpair_t *nvp);
 338 int64_t fnvpair_value_int64(nvpair_t *nvp);
 339 uint8_t fnvpair_value_uint8_t(nvpair_t *nvp);
 340 uint16_t fnvpair_value_uint16(nvpair_t *nvp);
 341 uint32_t fnvpair_value_uint32(nvpair_t *nvp);
 342 uint64_t fnvpair_value_uint64(nvpair_t *nvp);
 343 char *fnvpair_value_string(nvpair_t *nvp);
 344 nvlist_t *fnvpair_value_nvlist(nvpair_t *nvp);




 345 
 346 #ifdef  __cplusplus
 347 }
 348 #endif
 349 
 350 #endif  /* _SYS_NVPAIR_H */


   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
  23  * Copyright (c) 2012 by Delphix. All rights reserved.
  24  * Copyright (c) 2013, Joyent, Inc. All rights reserved.
  25  */
  26 
  27 #ifndef _SYS_NVPAIR_H
  28 #define _SYS_NVPAIR_H
  29 
  30 #include <sys/types.h>
  31 #include <sys/time.h>
  32 #include <sys/errno.h>
  33 #include <sys/va_list.h>
  34 
  35 #if defined(_KERNEL) && !defined(_BOOT)
  36 #include <sys/kmem.h>
  37 #endif
  38 
  39 #ifdef  __cplusplus
  40 extern "C" {
  41 #endif
  42 
  43 typedef enum {
  44         DATA_TYPE_UNKNOWN = 0,


 307 void fnvlist_add_int16_array(nvlist_t *, const char *, int16_t *, uint_t);
 308 void fnvlist_add_uint16_array(nvlist_t *, const char *, uint16_t *, uint_t);
 309 void fnvlist_add_int32_array(nvlist_t *, const char *, int32_t *, uint_t);
 310 void fnvlist_add_uint32_array(nvlist_t *, const char *, uint32_t *, uint_t);
 311 void fnvlist_add_int64_array(nvlist_t *, const char *, int64_t *, uint_t);
 312 void fnvlist_add_uint64_array(nvlist_t *, const char *, uint64_t *, uint_t);
 313 void fnvlist_add_string_array(nvlist_t *, const char *, char * const *, uint_t);
 314 void fnvlist_add_nvlist_array(nvlist_t *, const char *, nvlist_t **, uint_t);
 315 
 316 void fnvlist_remove(nvlist_t *, const char *);
 317 void fnvlist_remove_nvpair(nvlist_t *, nvpair_t *);
 318 
 319 nvpair_t *fnvlist_lookup_nvpair(nvlist_t *nvl, const char *name);
 320 boolean_t fnvlist_lookup_boolean(nvlist_t *nvl, const char *name);
 321 boolean_t fnvlist_lookup_boolean_value(nvlist_t *nvl, const char *name);
 322 uchar_t fnvlist_lookup_byte(nvlist_t *nvl, const char *name);
 323 int8_t fnvlist_lookup_int8(nvlist_t *nvl, const char *name);
 324 int16_t fnvlist_lookup_int16(nvlist_t *nvl, const char *name);
 325 int32_t fnvlist_lookup_int32(nvlist_t *nvl, const char *name);
 326 int64_t fnvlist_lookup_int64(nvlist_t *nvl, const char *name);
 327 uint8_t fnvlist_lookup_uint8(nvlist_t *nvl, const char *name);
 328 uint16_t fnvlist_lookup_uint16(nvlist_t *nvl, const char *name);
 329 uint32_t fnvlist_lookup_uint32(nvlist_t *nvl, const char *name);
 330 uint64_t fnvlist_lookup_uint64(nvlist_t *nvl, const char *name);
 331 char *fnvlist_lookup_string(nvlist_t *nvl, const char *name);
 332 nvlist_t *fnvlist_lookup_nvlist(nvlist_t *nvl, const char *name);
 333 
 334 boolean_t fnvpair_value_boolean_value(nvpair_t *nvp);
 335 uchar_t fnvpair_value_byte(nvpair_t *nvp);
 336 int8_t fnvpair_value_int8(nvpair_t *nvp);
 337 int16_t fnvpair_value_int16(nvpair_t *nvp);
 338 int32_t fnvpair_value_int32(nvpair_t *nvp);
 339 int64_t fnvpair_value_int64(nvpair_t *nvp);
 340 uint8_t fnvpair_value_uint8(nvpair_t *nvp);
 341 uint16_t fnvpair_value_uint16(nvpair_t *nvp);
 342 uint32_t fnvpair_value_uint32(nvpair_t *nvp);
 343 uint64_t fnvpair_value_uint64(nvpair_t *nvp);
 344 char *fnvpair_value_string(nvpair_t *nvp);
 345 nvlist_t *fnvpair_value_nvlist(nvpair_t *nvp);
 346 hrtime_t fnvpair_value_hrtime(nvpair_t *);
 347 #if !defined(_KERNEL)
 348 double fnvpair_value_double(nvpair_t *);
 349 #endif
 350 
 351 #ifdef  __cplusplus
 352 }
 353 #endif
 354 
 355 #endif  /* _SYS_NVPAIR_H */