Decoding certain OEM-specific records may depend on the SMBIOS
version. Pass it as an extra parameter.

Signed-off-by: Jean Delvare <[email protected]>
---
Unfortunately this change temporarily adds a build warning due
to "ver" being unused. This warning will go away as soon as
we add a first user.

 dmidecode.c |    2 +-
 dmioem.c    |    2 +-
 dmioem.h    |    4 +++-
 3 files changed, 5 insertions(+), 3 deletions(-)

--- a/dmidecode.c
+++ b/dmidecode.c
@@ -5561,7 +5561,7 @@ static void dmi_decode(const struct dmi_
                        break;
 
                default:
-                       if (dmi_decode_oem(h))
+                       if (dmi_decode_oem(h, ver))
                                break;
                        if (opt.flags & FLAG_QUIET)
                                return;
--- a/dmioem.c
+++ b/dmioem.c
@@ -2261,7 +2261,7 @@ static int dmi_decode_ibm_lenovo(const s
  * Dispatch vendor-specific entries decoding
  * Return 1 if decoding was successful, 0 otherwise
  */
-int dmi_decode_oem(const struct dmi_header *h)
+int dmi_decode_oem(const struct dmi_header *h, u16 ver)
 {
        switch (dmi_vendor)
        {
--- a/dmioem.h
+++ b/dmioem.h
@@ -19,7 +19,9 @@
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
 
+#include "types.h"
+
 struct dmi_header;
 
 void dmi_set_vendor(const char *s, const char *p);
-int dmi_decode_oem(const struct dmi_header *h);
+int dmi_decode_oem(const struct dmi_header *h, u16 ver);

-- 
Jean Delvare
SUSE L3 Support

Reply via email to