summaryrefslogtreecommitdiff
path: root/usr/src/common/smbios/smb_open.c
diff options
context:
space:
mode:
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) || (