Re: [PATCH 34/36] machine: Use DEFINE_PROP_STRING for string properties

2020-10-30 Thread Eduardo Habkost
On Fri, Oct 30, 2020 at 09:41:46PM +0100, Paolo Bonzini wrote: > Il ven 30 ott 2020, 21:03 Eduardo Habkost ha scritto: > > > > OBJECT_CLASS_PROPERTY_ADD_STR(oc, MachineState, kernel_filename, > > > "kernel", prop_allow_set_always); > > > > I like the idea of

Re: [PATCH 34/36] machine: Use DEFINE_PROP_STRING for string properties

2020-10-30 Thread Paolo Bonzini
Il ven 30 ott 2020, 21:03 Eduardo Habkost ha scritto: > > OBJECT_CLASS_PROPERTY_ADD_STR(oc, MachineState, kernel_filename, > > "kernel", prop_allow_set_always); > > I like the idea of having an interface like this, but I would > like to avoid having to write

Re: [PATCH 34/36] machine: Use DEFINE_PROP_STRING for string properties

2020-10-30 Thread Eduardo Habkost
On Fri, Oct 30, 2020 at 06:10:34PM +0100, Paolo Bonzini wrote: > On 29/10/20 23:02, Eduardo Habkost wrote: > > +static Property machine_props[] = { > > +DEFINE_PROP_STRING("kernel", MachineState, kernel_filename), > > +DEFINE_PROP_STRING("initrd", MachineState, initrd_filename), > > +DE

Re: [PATCH 34/36] machine: Use DEFINE_PROP_STRING for string properties

2020-10-30 Thread Paolo Bonzini
On 29/10/20 23:02, Eduardo Habkost wrote: > +static Property machine_props[] = { > +DEFINE_PROP_STRING("kernel", MachineState, kernel_filename), > +DEFINE_PROP_STRING("initrd", MachineState, initrd_filename), > +DEFINE_PROP_STRING("append", MachineState, kernel_cmdline), > +DEFINE_P

[PATCH 34/36] machine: Use DEFINE_PROP_STRING for string properties

2020-10-29 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- hw/core/machine.c | 166 ++ 1 file changed, 19 insertions(+), 147 deletions(-) diff --git a/hw/core/machine.c b/hw/core/machine.c index c5e0e79e6d..97e102911a 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@