diff mbox

[RFC,v3,09/35] piix: Move pc-0.11 drive version compat props TO PC_COMPAT_0_11

Message ID 1404519002-10224-10-git-send-email-ehabkost@redhat.com
State New
Headers show

Commit Message

Eduardo Habkost July 5, 2014, 12:09 a.m. UTC
The current code setting ide-drive.ver and scsi-disk.ver on pc-0.11
breaks the PC_COMPAT_* nesting pattern we currently use.

As those variables are overwritten in pc-0.10 too, they can be inherited
by pc-0.10 with no side-effects at all.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/i386/pc_piix.c | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)
diff mbox

Patch

diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 21c9720..2ef90f2 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -784,6 +784,14 @@  static QEMUMachine pc_machine_v0_12 = {
             .driver   = TYPE_PCI_DEVICE,\
             .property = "rombar",\
             .value    = stringify(0),\
+        },{\
+            .driver   = "ide-drive",\
+            .property = "ver",\
+            .value    = "0.11",\
+        },{\
+            .driver   = "scsi-disk",\
+            .property = "ver",\
+            .value    = "0.11",\
         }
 
 static QEMUMachine pc_machine_v0_11 = {
@@ -791,15 +799,6 @@  static QEMUMachine pc_machine_v0_11 = {
     .name = "pc-0.11",
     .compat_props = (GlobalProperty[]) {
         PC_COMPAT_0_11,
-        {
-            .driver   = "ide-drive",
-            .property = "ver",
-            .value    = "0.11",
-        },{
-            .driver   = "scsi-disk",
-            .property = "ver",
-            .value    = "0.11",
-        },
         { /* end of list */ }
     },
     .hw_version = "0.11",