[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC] QDev explicit constructors & destructors
From: |
Peter Crosthwaite |
Subject: |
Re: [Qemu-devel] [RFC] QDev explicit constructors & destructors |
Date: |
Wed, 24 Jun 2015 01:29:15 -0700 |
On Wed, Jun 24, 2015 at 12:30 AM, Liviu Ionescu <address@hidden> wrote:
>
>> On 23 Jun 2015, at 23:10, Liviu Ionescu <address@hidden> wrote:
>>
>> another solution would look like:
>>
>> DeviceState *dev = my_dev_alloc(NULL, TYPE_MYTYPE);
>> my_dev_prop_set_string(dev, "param", "something");
>> my_dev_realize(dev);
>> my_dev_prop_set_uint32(dev, "xyz", 123);
>>
>> which obviously fails while trying to set the locked "xyz" property.
>
> as a last resort to avoid explicit constructors, what about doing whatever
> tricks are necessary to have these properties unlocked even after realize()?
>
Props can be changed after realize if you use a QOM prop rather than a qdev.
>
> Peter C, is this solution acceptable?
>
Settable props are generally acceptable, but it is unusual for a
machine init routine.
> if so, I'll update my code and perhaps tomorrow we can schedule the Skype
> call.
>
Got your vite on Skype. Will probably have to be an evening your time
to catch me in the morning.
Regards,
Peter
>
> regards,
>
> Liviu
>
>
- Re: [Qemu-devel] [RFC] QDev explicit constructors & destructors, (continued)
- Re: [Qemu-devel] [RFC] QDev explicit constructors & destructors, Liviu Ionescu, 2015/06/23
- Re: [Qemu-devel] [RFC] QDev explicit constructors & destructors, Andreas Färber, 2015/06/23
- Re: [Qemu-devel] [RFC] QDev explicit constructors & destructors, Liviu Ionescu, 2015/06/23
- Re: [Qemu-devel] [RFC] QDev explicit constructors & destructors, Peter Crosthwaite, 2015/06/23
- Re: [Qemu-devel] [RFC] QDev explicit constructors & destructors, Liviu Ionescu, 2015/06/23
- Re: [Qemu-devel] [RFC] QDev explicit constructors & destructors, Peter Crosthwaite, 2015/06/23
- Re: [Qemu-devel] [RFC] QDev explicit constructors & destructors, Liviu Ionescu, 2015/06/23
- Re: [Qemu-devel] [RFC] QDev explicit constructors & destructors, Andreas Färber, 2015/06/23
- Re: [Qemu-devel] [RFC] QDev explicit constructors & destructors, Liviu Ionescu, 2015/06/23
- Re: [Qemu-devel] [RFC] QDev explicit constructors & destructors, Liviu Ionescu, 2015/06/24
- Re: [Qemu-devel] [RFC] QDev explicit constructors & destructors,
Peter Crosthwaite <=
- Re: [Qemu-devel] [RFC] QDev explicit constructors & destructors, Liviu Ionescu, 2015/06/24
- Re: [Qemu-devel] [RFC] QDev explicit constructors & destructors, Paolo Bonzini, 2015/06/24
- Re: [Qemu-devel] [RFC] QDev explicit constructors & destructors, Andreas Färber, 2015/06/24
- Re: [Qemu-devel] [RFC] QDev explicit constructors & destructors, Andreas Färber, 2015/06/24
- Re: [Qemu-devel] [RFC] QDev explicit constructors & destructors, Liviu Ionescu, 2015/06/24
- Re: [Qemu-devel] [RFC] QDev explicit constructors & destructors, Andreas Färber, 2015/06/24
- Re: [Qemu-devel] [RFC] QDev explicit constructors & destructors, Liviu Ionescu, 2015/06/24
- Re: [Qemu-devel] [RFC] QDev explicit constructors & destructors, Andreas Färber, 2015/06/24
- Re: [Qemu-devel] [RFC] QDev explicit constructors & destructors, Liviu Ionescu, 2015/06/24
- Re: [Qemu-devel] [RFC] QDev explicit constructors & destructors, Paolo Bonzini, 2015/06/24