[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] [PATCH 3/4] vl.c: do not set 'type' property
From: |
Andreas Färber |
Subject: |
Re: [Qemu-ppc] [Qemu-devel] [PATCH 3/4] vl.c: do not set 'type' property in obj_set_property |
Date: |
Thu, 15 May 2014 18:38:27 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
Am 15.05.2014 18:15, schrieb Markus Armbruster:
> Marcel Apfelbaum <address@hidden> writes:
>
>> Filter out also 'type' property when setting
>> object's properties
>>
>> Reviewed-by: Paolo Bonzini <address@hidden>
>> Signed-off-by: Marcel Apfelbaum <address@hidden>
>> ---
>> vl.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/vl.c b/vl.c
>> index 58673bd..6ec6c1a 100644
>> --- a/vl.c
>> +++ b/vl.c
>> @@ -2889,7 +2889,8 @@ static int object_set_property(const char *name, const
>> char *value, void *opaque
>> StringInputVisitor *siv;
>> Error *local_err = NULL;
>>
>> - if (strcmp(name, "qom-type") == 0 || strcmp(name, "id") == 0) {
>> + if (strcmp(name, "qom-type") == 0 || strcmp(name, "id") == 0 ||
>> + strcmp(name, "type") == 0) {
>> return 0;
>> }
>
> I can see why "id" and "qom-type" need to be filtered out: they're
> consumed by object_create() before object_set_property() gets called.
>
> I can't see why "type". Explain?
My understanding is,
-machine [type=]name[,...]
coincides with every Object exposing a read-only property "type".
Not only would setting it fail, but the values differ (display name vs.
unique type name).
On that matter, our help output does not seem to indicate the name of
the corresponding -object parameter, my unverified guess is that that is
called "qom-type".
OTOH there's no reason to suppress "qom-type" or "id" for -machine, as
implied when I suggested using a separate function.
Regards,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 4/4] hw/machine: qemu machine opts as properties to QemuMachineState, (continued)
- [Qemu-ppc] [Qemu-devel] [PATCH 1/4] machine: conversion of QEMUMachineInitArgs to MachineState, Marcel Apfelbaum, 2014/05/07
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 1/4] machine: conversion of QEMUMachineInitArgs to MachineState, Laszlo Ersek, 2014/05/12
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 1/4] machine: conversion of QEMUMachineInitArgs to MachineState, Cornelia Huck, 2014/05/13
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 1/4] machine: conversion of QEMUMachineInitArgs to MachineState, Michael S. Tsirkin, 2014/05/13
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 1/4] machine: conversion of QEMUMachineInitArgs to MachineState, Andreas Färber, 2014/05/13
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 1/4] machine: conversion of QEMUMachineInitArgs to MachineState, Markus Armbruster, 2014/05/15
- [Qemu-ppc] [Qemu-devel] [PATCH 3/4] vl.c: do not set 'type' property in obj_set_property, Marcel Apfelbaum, 2014/05/07
- Re: [Qemu-ppc] [Qemu-devel] [Qemu-detvel] [PATCH 0/4] machine: QemuOpts per machine, Marcel Apfelbaum, 2014/05/13