mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
smbios: rename/expose structures/bitmaps used by both legacy and modern code
As a preparation to move legacy handling into a separate file, add prefix 'smbios_' to type0/type1/have_binfile_bitmap/have_fields_bitmap and expose them in smbios.h so that they can be reused in legacy and modern code. Doing it as a separate patch to avoid rename cluttering follow-up patch which will move legacy code into a separate file. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Ani Sinha <anisinha@redhat.com> Message-Id: <20240314152302.2324164-11-imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
684b49fda6
commit
d638a8659b
2 changed files with 69 additions and 60 deletions
|
@ -2,6 +2,7 @@
|
|||
#define QEMU_SMBIOS_H
|
||||
|
||||
#include "qapi/qapi-types-machine.h"
|
||||
#include "qemu/bitmap.h"
|
||||
|
||||
/*
|
||||
* SMBIOS Support
|
||||
|
@ -16,8 +17,23 @@
|
|||
*
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
const char *vendor, *version, *date;
|
||||
bool have_major_minor, uefi;
|
||||
uint8_t major, minor;
|
||||
} smbios_type0_t;
|
||||
extern smbios_type0_t smbios_type0;
|
||||
|
||||
typedef struct {
|
||||
const char *manufacturer, *product, *version, *serial, *sku, *family;
|
||||
/* uuid is in qemu_uuid */
|
||||
} smbios_type1_t;
|
||||
extern smbios_type1_t smbios_type1;
|
||||
|
||||
#define SMBIOS_MAX_TYPE 127
|
||||
extern DECLARE_BITMAP(smbios_have_binfile_bitmap, SMBIOS_MAX_TYPE + 1);
|
||||
extern DECLARE_BITMAP(smbios_have_fields_bitmap, SMBIOS_MAX_TYPE + 1);
|
||||
|
||||
#define offsetofend(TYPE, MEMBER) \
|
||||
(offsetof(TYPE, MEMBER) + sizeof_field(TYPE, MEMBER))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue