summaryrefslogtreecommitdiff
path: root/usr/src/common/smbios/smb_open.c
diff options
context:
space:
mode:
authorRobert Mustacchi <rm@joyent.com>2016-11-29 22:32:42 +0000
committerRobert Mustacchi <rm@joyent.com>2017-02-01 10:43:38 -0800
commite5cce96fec95bace977f58e07912d3ab0e33b30d (patch)
treed1358948a0120294e5aa2d6b81bce4c593e02c1e /usr/src/common/smbios/smb_open.c
parentdefc4c8acfa01dba1ef3c13ca0cafccfcede51c0 (diff)
downloadillumos-joyent-e5cce96fec95bace977f58e07912d3ab0e33b30d.tar.gz
7747 Want SMBIOS 3.1 support
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com> Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com> Reviewed by: Toomas Soome <tsoome@me.com> Reviewed by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org> Reviewed by: Garrett D'Amore <garrett@damore.org> Reviewed by: Dale Ghent <daleg@omniti.com> Approved by: Dan McDonald <danmcd@omniti.com>
Diffstat (limited to 'usr/src/common/smbios/smb_open.c')
-rw-r--r--usr/src/common/smbios/smb_open.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/usr/src/common/smbios/smb_open.c b/usr/src/common/smbios/smb_open.c
index c5417e0c0f..23d4a0aaca 100644
--- a/usr/src/common/smbios/smb_open.c
+++ b/usr/src/common/smbios/smb_open.c
@@ -21,7 +21,7 @@
/*
* Copyright 2015 OmniTI Computer Consulting, Inc. All rights reserved.
- * Copyright 2015 Joyent, Inc.
+ * Copyright 2016 Joyent, Inc.
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -89,6 +89,7 @@ smbios_bufopen(const smbios_entry_t *ep, const void *buf, size_t len,
case SMB_VERSION_27:
case SMB_VERSION_28:
case SMB_VERSION_30:
+ case SMB_VERSION_31:
break;
default:
return (smb_open_error(shp, errp, ESMB_VERSION));
@@ -398,6 +399,14 @@ smb_strptr(const smb_struct_t *stp, uint_t i)
}
int
+smb_libgteq(smbios_hdl_t *shp, int version)
+{
+ return (SMB_MAJOR(shp->sh_libvers) > SMB_MAJOR(version) || (
+ SMB_MAJOR(shp->sh_libvers) == SMB_MAJOR(version) &&
+ SMB_MINOR(shp->sh_libvers) >= SMB_MINOR(version)));
+}
+
+int
smb_gteq(smbios_hdl_t *shp, int version)
{
return (SMB_MAJOR(shp->sh_smbvers) > SMB_MAJOR(version) || (