diff mbox

[v18,7/9] add MachineClass->default_props for setting default device properties

Message ID 1453468862-118912-8-git-send-email-imammedo@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Igor Mammedov Jan. 22, 2016, 1:21 p.m. UTC
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
 include/hw/boards.h | 1 +
 vl.c                | 4 ++++
 2 files changed, 5 insertions(+)
diff mbox

Patch

diff --git a/include/hw/boards.h b/include/hw/boards.h
index 0f30959..d495611 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -90,6 +90,7 @@  struct MachineClass {
     const char *default_machine_opts;
     const char *default_boot_order;
     const char *default_display;
+    GlobalProperty *default_props;
     GlobalProperty *compat_props;
     const char *hw_version;
     ram_addr_t default_ram_size;
diff --git a/vl.c b/vl.c
index f043009..3c5a936 100644
--- a/vl.c
+++ b/vl.c
@@ -4491,6 +4491,10 @@  int main(int argc, char **argv, char **envp)
             exit (i == 1 ? 1 : 0);
     }
 
+    if (machine_class->default_props) {
+        qdev_prop_register_global_list(machine_class->default_props);
+    }
+
     if (machine_class->compat_props) {
         qdev_prop_register_global_list(machine_class->compat_props);
     }