QOM devices patch queue 2014-07-21
Hello Peter,
This is my QOM (devices) patch queue. Please pull.
Regards,
Andreas
The following changes since commit 147fc419734b057b9d9154c2ca0d9d397054104b:
Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-2014-07-18' into staging (2014-07-18 16:59:29 +0100)
are available in the git repository at:
git://github.com/afaerber/qemu-cpu.git tags/qom-devices-for-2.1
for you to fetch changes up to b0ddb8bf6bf1739240640f353fd49e9e5d3f85dc:
machine: Replace underscores in machine's property names (2014-07-21 18:58:36 +0200)
----------------------------------------------------------------
QOM and device refactorings
* Machine: Property name fixups for 2.1 ABI
----------------------------------------------------------------
Marcel Apfelbaum (1):
machine: Replace underscores in machine's property names
hw/core/machine.c | 8 ++++---- vl.c | 12 +++++++++++- 2 files changed, 15 insertions(+), 5 deletions(-)
[Qemu-devel] [PULL 1/1] machine: Replace underscores in machine's property names
From: Marcel Apfelbaum <[email protected]>
Replaced '_' with '-' to comply with QOM guidelines. Made the conversion from command line to QMP in vl.c.
--- hw/core/machine.c | 8 ++++---- vl.c | 12 +++++++++++- 2 files changed, 15 insertions(+), 5 deletions(-)
hw/core/machine.c +4 -4
@@ -239,11 +239,11 @@ static void machine_initfn(Object *obj) {object_property_add_str (obj,"accel" , machine_get_accel, machine_set_accel,NULL ); -object_property_add_bool (obj,"kernel_irqchip" , +object_property_add_bool (obj,"kernel-irqchip" , machine_get_kernel_irqchip, machine_set_kernel_irqchip,NULL ); -object_property_add (obj,"kvm_shadow_mem" ,"int" , +object_property_add (obj,"kvm-shadow-mem" ,"int" , machine_get_kvm_shadow_mem, machine_set_kvm_shadow_mem,NULL ,NULL ,NULL );
@@ -257,11 +257,11 @@ static void machine_initfn(Object *obj) machine_get_dtb, machine_set_dtb, NULL);object_property_add_str (obj,"dumpdtb" , machine_get_dumpdtb, machine_set_dumpdtb,NULL ); -object_property_add (obj,"phandle_start" ,"int" , +object_property_add (obj,"phandle-start" ,"int" , machine_get_phandle_start, machine_set_phandle_start,NULL ,NULL ,NULL ); -object_property_add_str (obj,"dt_compatible" , +object_property_add_str (obj,"dt-compatible" , machine_get_dt_compatible, machine_set_dt_compatible,NULL );
vl.c +11 -1
@@ -2823,15 +2823,25 @@ static int object_set_property(const char *name, const char *value, void *opaqueObject *obj =OBJECT (opaque);StringInputVisitor *siv;Error *local_err =NULL ; +char *c, *qom_name;if (strcmp (name,"qom-type" ) ==0 ||strcmp (name,"id" ) ==0 ||strcmp (name,"type" ) ==0 ) {return 0 ; } + qom_name =g_strdup (name); + c = qom_name; +while (*c++) { +if (*c =='_' ) { + *c ='-' ; + } + } + siv =string_input_visitor_new (value); -object_property_set (obj,string_input_get_visitor (siv), name, &local_err); +object_property_set (obj,string_input_get_visitor (siv), qom_name, &local_err);string_input_visitor_cleanup (siv); +g_free (qom_name);if (local_err) {qerror_report_err (local_err);
Signature · 1 line
1.8.4.5
Peter Maydell
AppliedQuoted 13 lines · Andreas Färber
Hello Peter,
This is my QOM (devices) patch queue. Please pull.
Regards,
AndreasCc Peter Maydell <[email protected]>The following changes since commit
147fc419734b057b9d9154c2ca0d9d397054104b:Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-2014-07-18' into staging (2014-07-18 16:59:29 +0100)
Quoted 8 lines
are available in the git repository at:
git://github.com/afaerber/qemu-cpu.gittags/qom-devices-for-2.1for you to fetch changes up to
b0ddb8bf6bf1739240640f353fd49e9e5d3f85dc:machine: Replace underscores in machine's property names (2014-07-21 18:58:36 +0200)
Applied, thanks.
-- PMM