SMBIOS: Use bitmaps to prevent incompatible comand line options
commit2e6e8d7a25a6e31dee58226ea7fc374844d69732
authorGabriel L. Somlo <gsomlo@gmail.com>
Wed, 23 Apr 2014 13:42:41 +0000 (23 09:42 -0400)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 5 May 2014 10:29:39 +0000 (5 12:29 +0200)
treeec82b3d1cd045cd033bbce2c30f10313bceea171
parentcb36acb672a380b4ca430e4a12abb3f2186f9f4f
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 <somlo@cmu.edu>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/i386/smbios.c
include/hw/i386/smbios.h