On Wed, Jun 24, 2015 at 12:30 AM, Liviu Ionescu <i...@livius.net> wrote: > >> On 23 Jun 2015, at 23:10, Liviu Ionescu <i...@livius.net> 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 > >