[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [v2 PATCH 02/13] SMBIOS: Rename smbios_set_type1_defaults()
From: |
Gabriel L. Somlo |
Subject: |
[Qemu-devel] [v2 PATCH 02/13] SMBIOS: Rename smbios_set_type1_defaults() for more general use |
Date: |
Tue, 11 Mar 2014 11:16:18 -0400 |
From: "Gabriel L. Somlo" <address@hidden>
Subsequent patches will utilize this function to set defaults for
more smbios types than just type 1, so the function name should
reflect this.
Signed-off-by: Gabriel Somlo <address@hidden>
---
hw/i386/pc_piix.c | 12 ++++++------
hw/i386/pc_q35.c | 8 ++++----
hw/i386/smbios.c | 4 ++--
include/hw/i386/smbios.h | 4 ++--
4 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index ae1699d..ef2d062 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -60,7 +60,7 @@ static const int ide_irq[MAX_IDE_BUS] = { 14, 15 };
static bool has_pci_info;
static bool has_acpi_build = true;
-static bool smbios_type1_defaults = true;
+static bool smbios_defaults = true;
/* Make sure that guest addresses aligned at 1Gbyte boundaries get mapped to
* host addresses aligned at 1Gbyte boundaries. This way we can use 1GByte
* pages in the host.
@@ -143,9 +143,9 @@ static void pc_init1(QEMUMachineInitArgs *args,
guest_info->has_pci_info = has_pci_info;
guest_info->isapc_ram_fw = !pci_enabled;
- if (smbios_type1_defaults) {
+ if (smbios_defaults) {
/* These values are guest ABI, do not change */
- smbios_set_type1_defaults("QEMU", "Standard PC (i440FX + PIIX, 1996)",
+ smbios_set_defaults("QEMU", "Standard PC (i440FX + PIIX, 1996)",
args->machine->name);
}
@@ -264,7 +264,7 @@ static void pc_init_pci(QEMUMachineInitArgs *args)
static void pc_compat_1_7(QEMUMachineInitArgs *args)
{
- smbios_type1_defaults = false;
+ smbios_defaults = false;
gigabyte_align = false;
}
@@ -343,7 +343,7 @@ static void pc_init_pci_no_kvmclock(QEMUMachineInitArgs
*args)
{
has_pci_info = false;
has_acpi_build = false;
- smbios_type1_defaults = false;
+ smbios_defaults = false;
disable_kvm_pv_eoi();
enable_compat_apic_id_mode();
pc_init1(args, 1, 0);
@@ -353,7 +353,7 @@ static void pc_init_isa(QEMUMachineInitArgs *args)
{
has_pci_info = false;
has_acpi_build = false;
- smbios_type1_defaults = false;
+ smbios_defaults = false;
if (!args->cpu_model) {
args->cpu_model = "486";
}
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index a7f6260..dfcc252 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -50,7 +50,7 @@
static bool has_pci_info;
static bool has_acpi_build = true;
-static bool smbios_type1_defaults = true;
+static bool smbios_defaults = true;
/* Make sure that guest addresses aligned at 1Gbyte boundaries get mapped to
* host addresses aligned at 1Gbyte boundaries. This way we can use 1GByte
* pages in the host.
@@ -130,9 +130,9 @@ static void pc_q35_init(QEMUMachineInitArgs *args)
guest_info->isapc_ram_fw = false;
guest_info->has_acpi_build = has_acpi_build;
- if (smbios_type1_defaults) {
+ if (smbios_defaults) {
/* These values are guest ABI, do not change */
- smbios_set_type1_defaults("QEMU", "Standard PC (Q35 + ICH9, 2009)",
+ smbios_set_defaults("QEMU", "Standard PC (Q35 + ICH9, 2009)",
args->machine->name);
}
@@ -242,7 +242,7 @@ static void pc_q35_init(QEMUMachineInitArgs *args)
static void pc_compat_1_7(QEMUMachineInitArgs *args)
{
- smbios_type1_defaults = false;
+ smbios_defaults = false;
gigabyte_align = false;
}
diff --git a/hw/i386/smbios.c b/hw/i386/smbios.c
index e8f41ad..89dc070 100644
--- a/hw/i386/smbios.c
+++ b/hw/i386/smbios.c
@@ -256,8 +256,8 @@ static void smbios_build_type_1_fields(void)
}
}
-void smbios_set_type1_defaults(const char *manufacturer,
- const char *product, const char *version)
+void smbios_set_defaults(const char *manufacturer,
+ const char *product, const char *version)
{
if (!type1.manufacturer) {
type1.manufacturer = manufacturer;
diff --git a/include/hw/i386/smbios.h b/include/hw/i386/smbios.h
index de1da87..a7ec973 100644
--- a/include/hw/i386/smbios.h
+++ b/include/hw/i386/smbios.h
@@ -16,8 +16,8 @@
#include "qemu/option.h"
void smbios_entry_add(QemuOpts *opts);
-void smbios_set_type1_defaults(const char *manufacturer,
- const char *product, const char *version);
+void smbios_set_defaults(const char *manufacturer,
+ const char *product, const char *version);
uint8_t *smbios_get_table(size_t *length);
/*
--
1.8.1.4
- Re: [Qemu-devel] SMBIOS (Set of 10 patches), (continued)
- Re: [Qemu-devel] SMBIOS (Set of 10 patches), Gerd Hoffmann, 2014/03/11
- Re: [Qemu-devel] SMBIOS (Set of 10 patches), Kevin O'Connor, 2014/03/11
- [Qemu-devel] [v2 PATCH 00/13] SMBIOS: build full tables in QEMU, Gabriel L. Somlo, 2014/03/11
- [Qemu-devel] [v2 PATCH 01/13] SMBIOS: Update all table definitions to smbios spec v2.3, Gabriel L. Somlo, 2014/03/11
- [Qemu-devel] [v2 PATCH 02/13] SMBIOS: Rename smbios_set_type1_defaults() for more general use,
Gabriel L. Somlo <=
- [Qemu-devel] [v2 PATCH 03/13] SMBIOS: Use macro to set smbios defaults, Gabriel L. Somlo, 2014/03/11
- [Qemu-devel] [v2 PATCH 04/13] SMBIOS: Use bitmaps to check for smbios table collisions, Gabriel L. Somlo, 2014/03/11
- [Qemu-devel] [v2 PATCH 05/13] SMBIOS: Add code to build full smbios tables; build type 2 table, Gabriel L. Somlo, 2014/03/11
- [Qemu-devel] [v3 PATCH 05/13] SMBIOS: Add code to build full smbios tables; build type 2 table, Gabriel L. Somlo, 2014/03/11
- [Qemu-devel] [v2 PATCH 06/13] SMBIOS: Build full tables for types 0 and 1, Gabriel L. Somlo, 2014/03/11
- [Qemu-devel] [v2 PATCH 09/13] SMBIOS: Build full type 4 tables, Gabriel L. Somlo, 2014/03/11
- [Qemu-devel] [v2 PATCH 08/13] SMBIOS: Build full type 3 table, Gabriel L. Somlo, 2014/03/11
- [Qemu-devel] [v2 PATCH 10/13] SMBIOS: Build full smbios v2.3 compliant type 16 and 17 tables, Gabriel L. Somlo, 2014/03/11
- [Qemu-devel] [v2 PATCH 07/13] SMBIOS: Remove unused code for passing individual fields to bios, Gabriel L. Somlo, 2014/03/11
- [Qemu-devel] [v2 PATCH 12/13] SMBIOS: Build full type 20 tables, Gabriel L. Somlo, 2014/03/11