Print this page
OS-1840 fmdump shall emit JSON (copyright fixes)
OS-1840 fmdump shall emit JSON (nvlist_print_json fixes)

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libnvpair/libnvpair.h
          +++ new/usr/src/lib/libnvpair/libnvpair.h
↓ open down ↓ 12 lines elided ↑ open up ↑
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
       23 + * Copyright (c) 2013, Joyent, Inc. All rights reserved.
  23   24   */
  24   25  
  25   26  #ifndef _LIBNVPAIR_H
  26   27  #define _LIBNVPAIR_H
  27   28  
  28   29  #include <sys/nvpair.h>
  29   30  #include <stdlib.h>
  30   31  #include <stdio.h>
  31   32  #include <regex.h>
  32   33  
↓ open down ↓ 6 lines elided ↑ open up ↑
  39   40   * are subject to change at any time and without notice.  The public
  40   41   * nvlist/nvpair interfaces, as documented in manpage sections 3NVPAIR,
  41   42   * are all imported from <sys/nvpair.h> included above.
  42   43   */
  43   44  
  44   45  extern int nvpair_value_match(nvpair_t *, int, char *, char **);
  45   46  extern int nvpair_value_match_regex(nvpair_t *, int, char *, regex_t *,
  46   47      char **);
  47   48  
  48   49  extern void nvlist_print(FILE *, nvlist_t *);
       50 +extern void nvlist_print_json(FILE *, nvlist_t *);
  49   51  extern void dump_nvlist(nvlist_t *, int);
  50   52  
  51   53  /*
  52   54   * Private nvlist printing interface that allows the caller some control
  53   55   * over output rendering (as opposed to nvlist_print and dump_nvlist).
  54   56   *
  55   57   * Obtain an opaque nvlist_prtctl_t cookie using nvlist_prtctl_alloc
  56   58   * (NULL on failure);  on return the cookie is set up for default formatting
  57   59   * and rendering.  Quote the cookie in subsequent customisation functions and
  58   60   * then pass the cookie to nvlist_prt to render the nvlist.  Finally,
↓ open down ↓ 136 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX