[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC v0 4/8] object: create default canonical paths for orp
From: |
Peter A. G. Crosthwaite |
Subject: |
[Qemu-devel] [RFC v0 4/8] object: create default canonical paths for orphans |
Date: |
Wed, 13 Jun 2012 19:38:33 +1000 |
Create a default canonical path for an object which doesnt have one. This
is a workaround for a bug probably buried deep with qdev as objects should
always have valid canonical paths, but the need came about with the
petalogix_ml605_mmu platform, the ethernet and dma devices as created by
qdev have bogus paths (apparently).
Signed-off-by: Peter A. G. Crosthwaite <address@hidden>
---
qom/object.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/qom/object.c b/qom/object.c
index e6c3cfb..1eba795 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -983,6 +983,13 @@ gchar *object_get_canonical_path(Object *obj)
obj = INTERFACE(obj)->iface_obj;
}
+ if (obj->parent == NULL) {
+ static int num_orphans = 0;
+ char orphan_name [16];
+ snprintf(orphan_name, 16, "orphan%d", num_orphans++);
+ object_property_add_child(root, orphan_name, obj, NULL);
+ }
+
while (obj != root) {
ObjectProperty *prop = NULL;
--
1.7.3.2
- [Qemu-devel] [RFC v0 0/8] QOMify AXI stream for Xilinx AXI ethernet/DMA, Peter A. G. Crosthwaite, 2012/06/13
- [Qemu-devel] [RFC v0 1/8] qom: revamp interfaces, Peter A. G. Crosthwaite, 2012/06/13
- [Qemu-devel] [RFC v0 2/8] xilinx: remove PROP_PTR properties, Peter A. G. Crosthwaite, 2012/06/13
- [Qemu-devel] [RFC v0 3/8] xilinx_axidma: Added missing TypeInfo, Peter A. G. Crosthwaite, 2012/06/13
- [Qemu-devel] [RFC v0 4/8] object: create default canonical paths for orphans,
Peter A. G. Crosthwaite <=
- [Qemu-devel] [RFC v0 6/8] xilinx dont cast to interface types with links, Peter A. G. Crosthwaite, 2012/06/13
- Re: [Qemu-devel] [RFC v0 6/8] xilinx dont cast to interface types with links, Paolo Bonzini, 2012/06/13
- Re: [Qemu-devel] [RFC v0 6/8] xilinx dont cast to interface types with links, Avi Kivity, 2012/06/13
- Re: [Qemu-devel] [RFC v0 6/8] xilinx dont cast to interface types with links, Paolo Bonzini, 2012/06/13
- Re: [Qemu-devel] [RFC v0 6/8] xilinx dont cast to interface types with links, Avi Kivity, 2012/06/13
- Re: [Qemu-devel] [RFC v0 6/8] xilinx dont cast to interface types with links, Paolo Bonzini, 2012/06/13
- Re: [Qemu-devel] [RFC v0 6/8] xilinx dont cast to interface types with links, Avi Kivity, 2012/06/13
- Re: [Qemu-devel] [RFC v0 6/8] xilinx dont cast to interface types with links, Anthony Liguori, 2012/06/13
[Qemu-devel] [RFC v0 7/8] petalogix_ml605_mmu: fixed qdev create for dma, Peter A. G. Crosthwaite, 2012/06/13