|
|
218e99 |
From 6a4b96232747a7e7319115a532f17913da6a7774 Mon Sep 17 00:00:00 2001
|
|
|
218e99 |
From: Markus Armbruster <armbru@redhat.com>
|
|
|
218e99 |
Date: Sat, 2 Nov 2013 10:01:21 +0100
|
|
|
218e99 |
Subject: [PATCH 21/29] smbios: Convert to QemuOpts
|
|
|
218e99 |
|
|
|
218e99 |
RH-Author: Markus Armbruster <armbru@redhat.com>
|
|
|
218e99 |
Message-id: <1383386488-29789-5-git-send-email-armbru@redhat.com>
|
|
|
218e99 |
Patchwork-id: 55240
|
|
|
218e99 |
O-Subject: [PATCH 7.0 qemu-kvm 04/11] smbios: Convert to QemuOpts
|
|
|
218e99 |
Bugzilla: 994490
|
|
|
218e99 |
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
218e99 |
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
218e99 |
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
218e99 |
|
|
|
218e99 |
From: Markus Armbruster <armbru@redhat.com>
|
|
|
218e99 |
|
|
|
218e99 |
So that it can be set in config file for -readconfig.
|
|
|
218e99 |
|
|
|
218e99 |
This tightens parsing of -smbios, and makes it more consistent with
|
|
|
218e99 |
other options: unknown parameters are rejected, numbers with trailing
|
|
|
218e99 |
junk are rejected, when a parameter is given multiple times, last
|
|
|
218e99 |
rather than first wins, ...
|
|
|
218e99 |
|
|
|
218e99 |
MST: drop one chunk to fix build errors
|
|
|
218e99 |
|
|
|
218e99 |
Signed-off-by: Markus Armbruster <armbru@redhat.com>
|
|
|
218e99 |
Reviewed-by: Eric Blake <eblake@redhat.com>
|
|
|
218e99 |
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
218e99 |
(cherry picked from commit 4f953d2fc806f1ba6fa76f01dfd121fe7d0dc4a7)
|
|
|
218e99 |
---
|
|
|
218e99 |
arch_init.c | 4 +-
|
|
|
218e99 |
hw/i386/smbios.c | 209 ++++++++++++++++++++++++++++++++++++---------
|
|
|
218e99 |
include/hw/i386/smbios.h | 4 +-
|
|
|
218e99 |
include/sysemu/arch_init.h | 2 +-
|
|
|
218e99 |
vl.c | 3 +-
|
|
|
218e99 |
5 files changed, 179 insertions(+), 43 deletions(-)
|
|
|
218e99 |
|
|
|
218e99 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
218e99 |
---
|
|
|
218e99 |
arch_init.c | 4 +-
|
|
|
218e99 |
hw/i386/smbios.c | 209 ++++++++++++++++++++++++++++++++++++--------
|
|
|
218e99 |
include/hw/i386/smbios.h | 4 +-
|
|
|
218e99 |
include/sysemu/arch_init.h | 2 +-
|
|
|
218e99 |
vl.c | 3 +-
|
|
|
218e99 |
5 files changed, 179 insertions(+), 43 deletions(-)
|
|
|
218e99 |
|
|
|
218e99 |
diff --git a/arch_init.c b/arch_init.c
|
|
|
218e99 |
index 7834d36..d8c4e2e 100644
|
|
|
218e99 |
--- a/arch_init.c
|
|
|
218e99 |
+++ b/arch_init.c
|
|
|
218e99 |
@@ -1077,10 +1077,10 @@ void do_acpitable_option(const QemuOpts *opts)
|
|
|
218e99 |
#endif
|
|
|
218e99 |
}
|
|
|
218e99 |
|
|
|
218e99 |
-void do_smbios_option(const char *optarg)
|
|
|
218e99 |
+void do_smbios_option(QemuOpts *opts)
|
|
|
218e99 |
{
|
|
|
218e99 |
#ifdef TARGET_I386
|
|
|
218e99 |
- smbios_entry_add(optarg);
|
|
|
218e99 |
+ smbios_entry_add(opts);
|
|
|
218e99 |
#endif
|
|
|
218e99 |
}
|
|
|
218e99 |
|
|
|
218e99 |
diff --git a/hw/i386/smbios.c b/hw/i386/smbios.c
|
|
|
218e99 |
index 0608aee..abfd6f7 100644
|
|
|
218e99 |
--- a/hw/i386/smbios.c
|
|
|
218e99 |
+++ b/hw/i386/smbios.c
|
|
|
218e99 |
@@ -2,9 +2,11 @@
|
|
|
218e99 |
* SMBIOS Support
|
|
|
218e99 |
*
|
|
|
218e99 |
* Copyright (C) 2009 Hewlett-Packard Development Company, L.P.
|
|
|
218e99 |
+ * Copyright (C) 2013 Red Hat, Inc.
|
|
|
218e99 |
*
|
|
|
218e99 |
* Authors:
|
|
|
218e99 |
* Alex Williamson <alex.williamson@hp.com>
|
|
|
218e99 |
+ * Markus Armbruster <armbru@redhat.com>
|
|
|
218e99 |
*
|
|
|
218e99 |
* This work is licensed under the terms of the GNU GPL, version 2. See
|
|
|
218e99 |
* the COPYING file in the top-level directory.
|
|
|
218e99 |
@@ -13,6 +15,7 @@
|
|
|
218e99 |
* GNU GPL, version 2 or (at your option) any later version.
|
|
|
218e99 |
*/
|
|
|
218e99 |
|
|
|
218e99 |
+#include "qemu/config-file.h"
|
|
|
218e99 |
#include "qemu/error-report.h"
|
|
|
218e99 |
#include "sysemu/sysemu.h"
|
|
|
218e99 |
#include "hw/i386/smbios.h"
|
|
|
218e99 |
@@ -41,11 +44,100 @@ struct smbios_table {
|
|
|
218e99 |
#define SMBIOS_FIELD_ENTRY 0
|
|
|
218e99 |
#define SMBIOS_TABLE_ENTRY 1
|
|
|
218e99 |
|
|
|
218e99 |
-
|
|
|
218e99 |
static uint8_t *smbios_entries;
|
|
|
218e99 |
static size_t smbios_entries_len;
|
|
|
218e99 |
static int smbios_type4_count = 0;
|
|
|
218e99 |
|
|
|
218e99 |
+static QemuOptsList qemu_smbios_opts = {
|
|
|
218e99 |
+ .name = "smbios",
|
|
|
218e99 |
+ .head = QTAILQ_HEAD_INITIALIZER(qemu_smbios_opts.head),
|
|
|
218e99 |
+ .desc = {
|
|
|
218e99 |
+ /*
|
|
|
218e99 |
+ * no elements => accept any params
|
|
|
218e99 |
+ * validation will happen later
|
|
|
218e99 |
+ */
|
|
|
218e99 |
+ { /* end of list */ }
|
|
|
218e99 |
+ }
|
|
|
218e99 |
+};
|
|
|
218e99 |
+
|
|
|
218e99 |
+static const QemuOptDesc qemu_smbios_file_opts[] = {
|
|
|
218e99 |
+ {
|
|
|
218e99 |
+ .name = "file",
|
|
|
218e99 |
+ .type = QEMU_OPT_STRING,
|
|
|
218e99 |
+ .help = "binary file containing an SMBIOS element",
|
|
|
218e99 |
+ },
|
|
|
218e99 |
+ { /* end of list */ }
|
|
|
218e99 |
+};
|
|
|
218e99 |
+
|
|
|
218e99 |
+static const QemuOptDesc qemu_smbios_type0_opts[] = {
|
|
|
218e99 |
+ {
|
|
|
218e99 |
+ .name = "type",
|
|
|
218e99 |
+ .type = QEMU_OPT_NUMBER,
|
|
|
218e99 |
+ .help = "SMBIOS element type",
|
|
|
218e99 |
+ },{
|
|
|
218e99 |
+ .name = "vendor",
|
|
|
218e99 |
+ .type = QEMU_OPT_STRING,
|
|
|
218e99 |
+ .help = "vendor name",
|
|
|
218e99 |
+ },{
|
|
|
218e99 |
+ .name = "version",
|
|
|
218e99 |
+ .type = QEMU_OPT_STRING,
|
|
|
218e99 |
+ .help = "version number",
|
|
|
218e99 |
+ },{
|
|
|
218e99 |
+ .name = "date",
|
|
|
218e99 |
+ .type = QEMU_OPT_STRING,
|
|
|
218e99 |
+ .help = "release date",
|
|
|
218e99 |
+ },{
|
|
|
218e99 |
+ .name = "release",
|
|
|
218e99 |
+ .type = QEMU_OPT_STRING,
|
|
|
218e99 |
+ .help = "revision number",
|
|
|
218e99 |
+ },
|
|
|
218e99 |
+ { /* end of list */ }
|
|
|
218e99 |
+};
|
|
|
218e99 |
+
|
|
|
218e99 |
+static const QemuOptDesc qemu_smbios_type1_opts[] = {
|
|
|
218e99 |
+ {
|
|
|
218e99 |
+ .name = "type",
|
|
|
218e99 |
+ .type = QEMU_OPT_NUMBER,
|
|
|
218e99 |
+ .help = "SMBIOS element type",
|
|
|
218e99 |
+ },{
|
|
|
218e99 |
+ .name = "manufacturer",
|
|
|
218e99 |
+ .type = QEMU_OPT_STRING,
|
|
|
218e99 |
+ .help = "manufacturer name",
|
|
|
218e99 |
+ },{
|
|
|
218e99 |
+ .name = "product",
|
|
|
218e99 |
+ .type = QEMU_OPT_STRING,
|
|
|
218e99 |
+ .help = "product name",
|
|
|
218e99 |
+ },{
|
|
|
218e99 |
+ .name = "version",
|
|
|
218e99 |
+ .type = QEMU_OPT_STRING,
|
|
|
218e99 |
+ .help = "version number",
|
|
|
218e99 |
+ },{
|
|
|
218e99 |
+ .name = "serial",
|
|
|
218e99 |
+ .type = QEMU_OPT_STRING,
|
|
|
218e99 |
+ .help = "serial number",
|
|
|
218e99 |
+ },{
|
|
|
218e99 |
+ .name = "uuid",
|
|
|
218e99 |
+ .type = QEMU_OPT_STRING,
|
|
|
218e99 |
+ .help = "UUID",
|
|
|
218e99 |
+ },{
|
|
|
218e99 |
+ .name = "sku",
|
|
|
218e99 |
+ .type = QEMU_OPT_STRING,
|
|
|
218e99 |
+ .help = "SKU number",
|
|
|
218e99 |
+ },{
|
|
|
218e99 |
+ .name = "family",
|
|
|
218e99 |
+ .type = QEMU_OPT_STRING,
|
|
|
218e99 |
+ .help = "family name",
|
|
|
218e99 |
+ },
|
|
|
218e99 |
+ { /* end of list */ }
|
|
|
218e99 |
+};
|
|
|
218e99 |
+
|
|
|
218e99 |
+static void smbios_register_config(void)
|
|
|
218e99 |
+{
|
|
|
218e99 |
+ qemu_add_opts(&qemu_smbios_opts);
|
|
|
218e99 |
+}
|
|
|
218e99 |
+
|
|
|
218e99 |
+machine_init(smbios_register_config);
|
|
|
218e99 |
+
|
|
|
218e99 |
static void smbios_validate_table(void)
|
|
|
218e99 |
{
|
|
|
218e99 |
if (smbios_type4_count && smbios_type4_count != smp_cpus) {
|
|
|
218e99 |
@@ -124,23 +216,30 @@ void smbios_add_field(int type, int offset, const void *data, size_t len)
|
|
|
218e99 |
cpu_to_le16(le16_to_cpu(*(uint16_t *)smbios_entries) + 1);
|
|
|
218e99 |
}
|
|
|
218e99 |
|
|
|
218e99 |
-static void smbios_build_type_0_fields(const char *t)
|
|
|
218e99 |
+static void smbios_build_type_0_fields(QemuOpts *opts)
|
|
|
218e99 |
{
|
|
|
218e99 |
- char buf[1024];
|
|
|
218e99 |
+ const char *val;
|
|
|
218e99 |
unsigned char major, minor;
|
|
|
218e99 |
|
|
|
218e99 |
- if (get_param_value(buf, sizeof(buf), "vendor", t))
|
|
|
218e99 |
+ val = qemu_opt_get(opts, "vendor");
|
|
|
218e99 |
+ if (val) {
|
|
|
218e99 |
smbios_add_field(0, offsetof(struct smbios_type_0, vendor_str),
|
|
|
218e99 |
- buf, strlen(buf) + 1);
|
|
|
218e99 |
- if (get_param_value(buf, sizeof(buf), "version", t))
|
|
|
218e99 |
+ val, strlen(val) + 1);
|
|
|
218e99 |
+ }
|
|
|
218e99 |
+ val = qemu_opt_get(opts, "version");
|
|
|
218e99 |
+ if (val) {
|
|
|
218e99 |
smbios_add_field(0, offsetof(struct smbios_type_0, bios_version_str),
|
|
|
218e99 |
- buf, strlen(buf) + 1);
|
|
|
218e99 |
- if (get_param_value(buf, sizeof(buf), "date", t))
|
|
|
218e99 |
+ val, strlen(val) + 1);
|
|
|
218e99 |
+ }
|
|
|
218e99 |
+ val = qemu_opt_get(opts, "date");
|
|
|
218e99 |
+ if (val) {
|
|
|
218e99 |
smbios_add_field(0, offsetof(struct smbios_type_0,
|
|
|
218e99 |
bios_release_date_str),
|
|
|
218e99 |
- buf, strlen(buf) + 1);
|
|
|
218e99 |
- if (get_param_value(buf, sizeof(buf), "release", t)) {
|
|
|
218e99 |
- if (sscanf(buf, "%hhu.%hhu", &major, &minor) != 2) {
|
|
|
218e99 |
+ val, strlen(val) + 1);
|
|
|
218e99 |
+ }
|
|
|
218e99 |
+ val = qemu_opt_get(opts, "release");
|
|
|
218e99 |
+ if (val) {
|
|
|
218e99 |
+ if (sscanf(val, "%hhu.%hhu", &major, &minor) != 2) {
|
|
|
218e99 |
error_report("Invalid release");
|
|
|
218e99 |
exit(1);
|
|
|
218e99 |
}
|
|
|
218e99 |
@@ -153,47 +252,69 @@ static void smbios_build_type_0_fields(const char *t)
|
|
|
218e99 |
}
|
|
|
218e99 |
}
|
|
|
218e99 |
|
|
|
218e99 |
-static void smbios_build_type_1_fields(const char *t)
|
|
|
218e99 |
+static void smbios_build_type_1_fields(QemuOpts *opts)
|
|
|
218e99 |
{
|
|
|
218e99 |
- char buf[1024];
|
|
|
218e99 |
+ const char *val;
|
|
|
218e99 |
|
|
|
218e99 |
- if (get_param_value(buf, sizeof(buf), "manufacturer", t))
|
|
|
218e99 |
+ val = qemu_opt_get(opts, "manufacturer");
|
|
|
218e99 |
+ if (val) {
|
|
|
218e99 |
smbios_add_field(1, offsetof(struct smbios_type_1, manufacturer_str),
|
|
|
218e99 |
- buf, strlen(buf) + 1);
|
|
|
218e99 |
- if (get_param_value(buf, sizeof(buf), "product", t))
|
|
|
218e99 |
+ val, strlen(val) + 1);
|
|
|
218e99 |
+ }
|
|
|
218e99 |
+ val = qemu_opt_get(opts, "product");
|
|
|
218e99 |
+ if (val) {
|
|
|
218e99 |
smbios_add_field(1, offsetof(struct smbios_type_1, product_name_str),
|
|
|
218e99 |
- buf, strlen(buf) + 1);
|
|
|
218e99 |
- if (get_param_value(buf, sizeof(buf), "version", t))
|
|
|
218e99 |
+ val, strlen(val) + 1);
|
|
|
218e99 |
+ }
|
|
|
218e99 |
+ val = qemu_opt_get(opts, "version");
|
|
|
218e99 |
+ if (val) {
|
|
|
218e99 |
smbios_add_field(1, offsetof(struct smbios_type_1, version_str),
|
|
|
218e99 |
- buf, strlen(buf) + 1);
|
|
|
218e99 |
- if (get_param_value(buf, sizeof(buf), "serial", t))
|
|
|
218e99 |
+ val, strlen(val) + 1);
|
|
|
218e99 |
+ }
|
|
|
218e99 |
+ val = qemu_opt_get(opts, "serial");
|
|
|
218e99 |
+ if (val) {
|
|
|
218e99 |
smbios_add_field(1, offsetof(struct smbios_type_1, serial_number_str),
|
|
|
218e99 |
- buf, strlen(buf) + 1);
|
|
|
218e99 |
- if (get_param_value(buf, sizeof(buf), "uuid", t)) {
|
|
|
218e99 |
- if (qemu_uuid_parse(buf, qemu_uuid) != 0) {
|
|
|
218e99 |
+ val, strlen(val) + 1);
|
|
|
218e99 |
+ }
|
|
|
218e99 |
+ val = qemu_opt_get(opts, "uuid");
|
|
|
218e99 |
+ if (val) {
|
|
|
218e99 |
+ if (qemu_uuid_parse(val, qemu_uuid) != 0) {
|
|
|
218e99 |
error_report("Invalid UUID");
|
|
|
218e99 |
exit(1);
|
|
|
218e99 |
}
|
|
|
218e99 |
}
|
|
|
218e99 |
- if (get_param_value(buf, sizeof(buf), "sku", t))
|
|
|
218e99 |
+ val = qemu_opt_get(opts, "sku");
|
|
|
218e99 |
+ if (val) {
|
|
|
218e99 |
smbios_add_field(1, offsetof(struct smbios_type_1, sku_number_str),
|
|
|
218e99 |
- buf, strlen(buf) + 1);
|
|
|
218e99 |
- if (get_param_value(buf, sizeof(buf), "family", t))
|
|
|
218e99 |
+ val, strlen(val) + 1);
|
|
|
218e99 |
+ }
|
|
|
218e99 |
+ val = qemu_opt_get(opts, "family");
|
|
|
218e99 |
+ if (val) {
|
|
|
218e99 |
smbios_add_field(1, offsetof(struct smbios_type_1, family_str),
|
|
|
218e99 |
- buf, strlen(buf) + 1);
|
|
|
218e99 |
+ val, strlen(val) + 1);
|
|
|
218e99 |
+ }
|
|
|
218e99 |
}
|
|
|
218e99 |
|
|
|
218e99 |
-void smbios_entry_add(const char *t)
|
|
|
218e99 |
+void smbios_entry_add(QemuOpts *opts)
|
|
|
218e99 |
{
|
|
|
218e99 |
- char buf[1024];
|
|
|
218e99 |
+ Error *local_err = NULL;
|
|
|
218e99 |
+ const char *val;
|
|
|
218e99 |
|
|
|
218e99 |
- if (get_param_value(buf, sizeof(buf), "file", t)) {
|
|
|
218e99 |
+ val = qemu_opt_get(opts, "file");
|
|
|
218e99 |
+ if (val) {
|
|
|
218e99 |
struct smbios_structure_header *header;
|
|
|
218e99 |
struct smbios_table *table;
|
|
|
218e99 |
- int size = get_image_size(buf);
|
|
|
218e99 |
+ int size;
|
|
|
218e99 |
+
|
|
|
218e99 |
+ qemu_opts_validate(opts, qemu_smbios_file_opts, &local_err);
|
|
|
218e99 |
+ if (local_err) {
|
|
|
218e99 |
+ error_report("%s", error_get_pretty(local_err));
|
|
|
218e99 |
+ exit(1);
|
|
|
218e99 |
+ }
|
|
|
218e99 |
|
|
|
218e99 |
+ size = get_image_size(val);
|
|
|
218e99 |
if (size == -1 || size < sizeof(struct smbios_structure_header)) {
|
|
|
218e99 |
- error_report("Cannot read SMBIOS file %s", buf);
|
|
|
218e99 |
+ error_report("Cannot read SMBIOS file %s", val);
|
|
|
218e99 |
exit(1);
|
|
|
218e99 |
}
|
|
|
218e99 |
|
|
|
218e99 |
@@ -208,8 +329,8 @@ void smbios_entry_add(const char *t)
|
|
|
218e99 |
table->header.type = SMBIOS_TABLE_ENTRY;
|
|
|
218e99 |
table->header.length = cpu_to_le16(sizeof(*table) + size);
|
|
|
218e99 |
|
|
|
218e99 |
- if (load_image(buf, table->data) != size) {
|
|
|
218e99 |
- error_report("Failed to load SMBIOS file %s", buf);
|
|
|
218e99 |
+ if (load_image(val, table->data) != size) {
|
|
|
218e99 |
+ error_report("Failed to load SMBIOS file %s", val);
|
|
|
218e99 |
exit(1);
|
|
|
218e99 |
}
|
|
|
218e99 |
|
|
|
218e99 |
@@ -225,14 +346,26 @@ void smbios_entry_add(const char *t)
|
|
|
218e99 |
return;
|
|
|
218e99 |
}
|
|
|
218e99 |
|
|
|
218e99 |
- if (get_param_value(buf, sizeof(buf), "type", t)) {
|
|
|
218e99 |
- unsigned long type = strtoul(buf, NULL, 0);
|
|
|
218e99 |
+ val = qemu_opt_get(opts, "type");
|
|
|
218e99 |
+ if (val) {
|
|
|
218e99 |
+ unsigned long type = strtoul(val, NULL, 0);
|
|
|
218e99 |
+
|
|
|
218e99 |
switch (type) {
|
|
|
218e99 |
case 0:
|
|
|
218e99 |
- smbios_build_type_0_fields(t);
|
|
|
218e99 |
+ qemu_opts_validate(opts, qemu_smbios_type0_opts, &local_err);
|
|
|
218e99 |
+ if (local_err) {
|
|
|
218e99 |
+ error_report("%s", error_get_pretty(local_err));
|
|
|
218e99 |
+ exit(1);
|
|
|
218e99 |
+ }
|
|
|
218e99 |
+ smbios_build_type_0_fields(opts);
|
|
|
218e99 |
return;
|
|
|
218e99 |
case 1:
|
|
|
218e99 |
- smbios_build_type_1_fields(t);
|
|
|
218e99 |
+ qemu_opts_validate(opts, qemu_smbios_type1_opts, &local_err);
|
|
|
218e99 |
+ if (local_err) {
|
|
|
218e99 |
+ error_report("%s", error_get_pretty(local_err));
|
|
|
218e99 |
+ exit(1);
|
|
|
218e99 |
+ }
|
|
|
218e99 |
+ smbios_build_type_1_fields(opts);
|
|
|
218e99 |
return;
|
|
|
218e99 |
default:
|
|
|
218e99 |
error_report("Don't know how to build fields for SMBIOS type %ld",
|
|
|
218e99 |
diff --git a/include/hw/i386/smbios.h b/include/hw/i386/smbios.h
|
|
|
218e99 |
index 56c6108..d9f43b7 100644
|
|
|
218e99 |
--- a/include/hw/i386/smbios.h
|
|
|
218e99 |
+++ b/include/hw/i386/smbios.h
|
|
|
218e99 |
@@ -13,7 +13,9 @@
|
|
|
218e99 |
*
|
|
|
218e99 |
*/
|
|
|
218e99 |
|
|
|
218e99 |
-void smbios_entry_add(const char *t);
|
|
|
218e99 |
+#include "qemu/option.h"
|
|
|
218e99 |
+
|
|
|
218e99 |
+void smbios_entry_add(QemuOpts *opts);
|
|
|
218e99 |
void smbios_add_field(int type, int offset, const void *data, size_t len);
|
|
|
218e99 |
uint8_t *smbios_get_table(size_t *length);
|
|
|
218e99 |
|
|
|
218e99 |
diff --git a/include/sysemu/arch_init.h b/include/sysemu/arch_init.h
|
|
|
218e99 |
index dece913..be71bca 100644
|
|
|
218e99 |
--- a/include/sysemu/arch_init.h
|
|
|
218e99 |
+++ b/include/sysemu/arch_init.h
|
|
|
218e99 |
@@ -28,7 +28,7 @@ extern const uint32_t arch_type;
|
|
|
218e99 |
|
|
|
218e99 |
void select_soundhw(const char *optarg);
|
|
|
218e99 |
void do_acpitable_option(const QemuOpts *opts);
|
|
|
218e99 |
-void do_smbios_option(const char *optarg);
|
|
|
218e99 |
+void do_smbios_option(QemuOpts *opts);
|
|
|
218e99 |
void cpudef_init(void);
|
|
|
218e99 |
void audio_init(void);
|
|
|
218e99 |
int tcg_available(void);
|
|
|
218e99 |
diff --git a/vl.c b/vl.c
|
|
|
218e99 |
index b8a8cc6..e82eb1c 100644
|
|
|
218e99 |
--- a/vl.c
|
|
|
218e99 |
+++ b/vl.c
|
|
|
218e99 |
@@ -3463,7 +3463,8 @@ int main(int argc, char **argv, char **envp)
|
|
|
218e99 |
do_acpitable_option(opts);
|
|
|
218e99 |
break;
|
|
|
218e99 |
case QEMU_OPTION_smbios:
|
|
|
218e99 |
- do_smbios_option(optarg);
|
|
|
218e99 |
+ opts = qemu_opts_parse(qemu_find_opts("smbios"), optarg, 0);
|
|
|
218e99 |
+ do_smbios_option(opts);
|
|
|
218e99 |
break;
|
|
|
218e99 |
case QEMU_OPTION_enable_kvm:
|
|
|
218e99 |
olist = qemu_find_opts("machine");
|
|
|
218e99 |
--
|
|
|
218e99 |
1.7.1
|
|
|
218e99 |
|