summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2013-08-16 15:18:31 +0200
committerMichael S. Tsirkin <mst@redhat.com>2013-09-28 23:49:39 +0300
commitfc3b32958a80bca13309e2695de07b43dd788421 (patch)
treeca421cb339cb55a86ae5c5a74cac65ab16d373f4 /include
parentec2df8c10a4585ba4641ae482cf2f5f13daa810e (diff)
downloadqemu-fc3b32958a80bca13309e2695de07b43dd788421.tar.gz
qemu-fc3b32958a80bca13309e2695de07b43dd788421.tar.bz2
qemu-fc3b32958a80bca13309e2695de07b43dd788421.zip
smbios: Make multiple -smbios type= accumulate sanely
Currently, -smbios type=T,NAME=VAL,... adds one field (T,NAME) with value VAL to fw_cfg for each unique NAME. If NAME occurs multiple times, the last one's VAL is used (before the QemuOpts conversion, the first one was used). Multiple -smbios can add multiple fields with the same (T, NAME). SeaBIOS reads all of them from fw_cfg, but uses only the first field (T, NAME). The others are ignored. "First one wins, subsequent ones get ignored silently" isn't nice. We commonly let the last option win. Useful, because it lets you -readconfig first, then selectively override with command line options. Clean up -smbios to work the common way. Accumulate the settings, with later ones overwriting earlier ones. Put the result into fw_cfg (no more useless duplicates). Bonus cleanup: qemu_uuid_parse() no longer sets SMBIOS system uuid by side effect. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/hw/i386/smbios.h1
-rw-r--r--include/sysemu/sysemu.h1
2 files changed, 1 insertions, 1 deletions
diff --git a/include/hw/i386/smbios.h b/include/hw/i386/smbios.h
index d9f43b7c57..b08ec713f2 100644
--- a/include/hw/i386/smbios.h
+++ b/include/hw/i386/smbios.h
@@ -16,7 +16,6 @@
#include "qemu/option.h"
void smbios_entry_add(QemuOpts *opts);
-void smbios_add_field(int type, int offset, const void *data, size_t len);
uint8_t *smbios_get_table(size_t *length);
/*
diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
index b1aa059102..42577363ca 100644
--- a/include/sysemu/sysemu.h
+++ b/include/sysemu/sysemu.h
@@ -16,6 +16,7 @@ extern const char *bios_name;
extern const char *qemu_name;
extern uint8_t qemu_uuid[];
+extern bool qemu_uuid_set;
int qemu_uuid_parse(const char *str, uint8_t *uuid);
#define UUID_FMT "%02hhx%02hhx%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx-%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx"