From 2e6e8d7a25a6e31dee58226ea7fc374844d69732 Mon Sep 17 00:00:00 2001 From: "Gabriel L. Somlo" Date: Wed, 23 Apr 2014 09:42:41 -0400 Subject: SMBIOS: Use bitmaps to prevent incompatible comand line options Replace existing smbios_check_collision() functionality with a pair of bitmaps: have_binfile_bitmap and have_fields_bitmap. Bits corresponding to each smbios type are set by smbios_entry_add(), which also uses the bitmaps to ensure that binary blobs and field values are never accepted for the same type. These bitmaps will also be used in the future to decide whether or not to build a full table for a given smbios type. Signed-off-by: Gabriel Somlo Signed-off-by: Gerd Hoffmann --- include/hw/i386/smbios.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/hw/i386/smbios.h b/include/hw/i386/smbios.h index 777e025..3a9361d 100644 --- a/include/hw/i386/smbios.h +++ b/include/hw/i386/smbios.h @@ -15,6 +15,8 @@ #include "qemu/option.h" +#define SMBIOS_MAX_TYPE 127 + void smbios_entry_add(QemuOpts *opts); void smbios_set_defaults(const char *manufacturer, const char *product, const char *version); -- cgit v1.1