qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v6 1/3] Check if GlobalProperty exists before registering
@ 2012-07-18 18:02 Crístian Viana
  2012-07-18 18:02 ` [Qemu-devel] [PATCH v6 2/3] Force driftfix=none on previous machines Crístian Viana
  2012-07-18 18:02 ` [Qemu-devel] [PATCH v6 3/3] Change driftfix default value to slew Crístian Viana
  0 siblings, 2 replies; 3+ messages in thread
From: Crístian Viana @ 2012-07-18 18:02 UTC (permalink / raw)
  To: QEMU Development ML; +Cc: Crístian Viana, Anthony Liguori

If a GlobalProperty has already been registered, it won't have its value
overwritten. This is done to enforce that the properties specified in the command
line will "win" over the ones specified by the machine properties, if set with
the parameter "-M".

Signed-off-by: Crístian Viana <vianac@linux.vnet.ibm.com>
---
Changes since v5:
- Updated commit message of PATCH 1/3
- Rebased on master

 hw/qdev-properties.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c
index 3571cf3..8356879 100644
--- a/hw/qdev-properties.c
+++ b/hw/qdev-properties.c
@@ -1212,6 +1212,14 @@ static QTAILQ_HEAD(, GlobalProperty) global_props = QTAILQ_HEAD_INITIALIZER(glob
 
 static void qdev_prop_register_global(GlobalProperty *prop)
 {
+    GlobalProperty *p;
+
+    QTAILQ_FOREACH(p, &global_props, next) {
+        if (strcmp(prop->driver, p->driver) == 0) {
+            return;
+        }
+    }
+
     QTAILQ_INSERT_TAIL(&global_props, prop, next);
 }
 
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-07-18 18:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-18 18:02 [Qemu-devel] [PATCH v6 1/3] Check if GlobalProperty exists before registering Crístian Viana
2012-07-18 18:02 ` [Qemu-devel] [PATCH v6 2/3] Force driftfix=none on previous machines Crístian Viana
2012-07-18 18:02 ` [Qemu-devel] [PATCH v6 3/3] Change driftfix default value to slew Crístian Viana

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).