mirror of
https://github.com/qemu/qemu.git
synced 2025-08-15 13:47:03 +00:00
hw/smbios: Remove 'smbios_uuid_encoded', simplify smbios_encode_uuid()
'smbios_encode_uuid' is always true, remove it, simplifying smbios_encode_uuid(). Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Message-Id: <20240617071118.60464-13-philmd@linaro.org>
This commit is contained in:
parent
c338128e80
commit
9adf35f04b
@ -30,7 +30,6 @@
|
|||||||
#include "hw/pci/pci_device.h"
|
#include "hw/pci/pci_device.h"
|
||||||
#include "smbios_build.h"
|
#include "smbios_build.h"
|
||||||
|
|
||||||
static const bool smbios_uuid_encoded = true;
|
|
||||||
/*
|
/*
|
||||||
* SMBIOS tables provided by user with '-smbios file=<foo>' option
|
* SMBIOS tables provided by user with '-smbios file=<foo>' option
|
||||||
*/
|
*/
|
||||||
@ -600,11 +599,9 @@ static void smbios_build_type_0_table(void)
|
|||||||
static void smbios_encode_uuid(struct smbios_uuid *uuid, QemuUUID *in)
|
static void smbios_encode_uuid(struct smbios_uuid *uuid, QemuUUID *in)
|
||||||
{
|
{
|
||||||
memcpy(uuid, in, 16);
|
memcpy(uuid, in, 16);
|
||||||
if (smbios_uuid_encoded) {
|
uuid->time_low = bswap32(uuid->time_low);
|
||||||
uuid->time_low = bswap32(uuid->time_low);
|
uuid->time_mid = bswap16(uuid->time_mid);
|
||||||
uuid->time_mid = bswap16(uuid->time_mid);
|
uuid->time_hi_and_version = bswap16(uuid->time_hi_and_version);
|
||||||
uuid->time_hi_and_version = bswap16(uuid->time_hi_and_version);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void smbios_build_type_1_table(void)
|
static void smbios_build_type_1_table(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user