Print this page
OS-1840 fmdump shall emit JSON
Reviewed by: Robert Mustacchi <rm@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/fm/fmdump/common/fault.c
          +++ new/usr/src/cmd/fm/fmdump/common/fault.c
↓ 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) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
       23 + * Copyright (c) 2013, Joyent, Inc. All rights reserved.
  23   24   */
  24   25  
  25   26  #include <fmdump.h>
  26   27  #include <stdio.h>
  27   28  #include <strings.h>
  28   29  
  29   30  /*ARGSUSED*/
  30   31  static int
  31   32  flt_short(fmd_log_t *lp, const fmd_log_record_t *rp, FILE *fp)
  32   33  {
↓ open down ↓ 245 lines elided ↑ open up ↑
 278  279  "TIME                           UUID"
 279  280  "                                 SUNW-MSG-ID",
 280  281  (fmd_log_rec_f *)flt_verb2
 281  282  }, {
 282  283  "TIME                           UUID"
 283  284  "                                 SUNW-MSG-ID",
 284  285  (fmd_log_rec_f *)flt_pretty
 285  286  }, {
 286  287  NULL,
 287  288  (fmd_log_rec_f *)flt_msg
      289 +}, {
      290 +NULL,
      291 +(fmd_log_rec_f *)fmdump_print_json
 288  292  } }
 289  293  };
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX