Print this page
4378 Clean up %C in *time() functions
438 need documentation for strftime %s flag

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/fruadm/fruadm.c
          +++ new/usr/src/cmd/fruadm/fruadm.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  /*
       23 + * Copyright (c) 2014 Gary Mills
       24 + *
  23   25   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  24   26   * Use is subject to license terms.
  25   27   */
  26   28  
  27   29  #include <limits.h>
  28   30  #include <stdio.h>
  29   31  #include <stdlib.h>
  30   32  #include <string.h>
  31   33  #include <libintl.h>
  32   34  #include <libfru.h>
↓ open down ↓ 132 lines elided ↑ open up ↑
 165  167                  case FDISP_Decimal:
 166  168                  {
 167  169                          (void) printf("%lld", lldata);
 168  170                          return;
 169  171                  }
 170  172                  case FDISP_Time:
 171  173                  {
 172  174                          char buffer[PATH_MAX];
 173  175                          time_t time;
 174  176                          time = (time_t)lldata;
 175      -                        (void) strftime(buffer, PATH_MAX, "%C",
      177 +                        (void) strftime(buffer, PATH_MAX, "%+",
 176  178                              localtime(&time));
 177  179                          (void) printf("%s", buffer);
 178  180                          return;
 179  181                  }
 180  182          }
 181  183  }
 182  184  
 183  185  static void
 184  186  displayBAasBinary(unsigned char *data, size_t length)
 185  187  {
↓ open down ↓ 780 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX