Print this page
5094 Update libsmbios with recent items
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Josef 'Jeff' Sipek<jeffpc@josefsipek.net>
Reviewed by: Garrett D'Amore <garrett@damore.org>

Split Close
Expand all
Collapse all
          --- old/usr/src/common/smbios/smb_open.c
          +++ new/usr/src/common/smbios/smb_open.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 2015 OmniTI Computer Consulting, Inc.  All rights reserved.
  23   24   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  24   25   * Use is subject to license terms.
  25   26   */
  26   27  
  27   28  #include <sys/smbios_impl.h>
  28   29  
  29   30  static const uint_t _smb_hashlen = 64;          /* hash length (must be Pof2) */
  30   31  static const char _smb_emptystr[] = "";         /* empty string to return */
  31   32  int _smb_debug = 0;                             /* default debug mode */
  32   33  
↓ open down ↓ 42 lines elided ↑ open up ↑
  75   76      int version, int flags, int *errp)
  76   77  {
  77   78          smbios_hdl_t *shp = smb_zalloc(sizeof (smbios_hdl_t));
  78   79          const smb_header_t *hp, *nhp;
  79   80          const uchar_t *p, *q, *s;
  80   81          uint_t i, h;
  81   82  
  82   83          switch (version) {
  83   84          case SMB_VERSION_23:
  84   85          case SMB_VERSION_24:
       86 +        case SMB_VERSION_25:
       87 +        case SMB_VERSION_26:
       88 +        case SMB_VERSION_27:
       89 +        case SMB_VERSION_28:
  85   90                  break;
  86   91          default:
  87   92                  return (smb_open_error(shp, errp, ESMB_VERSION));
  88   93          }
  89   94  
  90   95          if (ep == NULL || buf == NULL || len == 0 || (flags & ~SMB_O_MASK))
  91   96                  return (smb_open_error(shp, errp, ESMB_INVAL));
  92   97  
  93   98          if (shp == NULL)
  94   99                  return (smb_open_error(shp, errp, ESMB_NOMEM));
↓ open down ↓ 295 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX