qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] qom: add object_property_is_set


From: Marcel Apfelbaum
Subject: Re: [Qemu-devel] [PATCH] qom: add object_property_is_set
Date: Wed, 19 Feb 2014 09:03:48 +0200

On Tue, 2014-02-18 at 18:26 +0100, Paolo Bonzini wrote:
> Il 18/02/2014 18:11, Marcel Apfelbaum ha scritto:
> > It is used to replace qemu_opt_get_bool that provides a
> > parameter for a default value. In this case we need to
> > differentiate "no value" from "false."
> 
> But what would the getter return in that case?  If possible, it's better 
> to initialize to the default value in an instance_init method.
I thought about it, but what if from different places you want different
defaults? Meaning, give me prop value, but if not set choose x (or y)

> 
> > I could send it with QemuMachine QOMify feature,
> > but this will be a fairly large series and I *really* want
> > to minimize it as much as I can, this is why I release small,
> > stand-alone patches, that fixes some issue (see [Qemu-devel]
> > [PATCH] qapi: output visitor crashes qemu if it encounters a NULL value),
> > or adds a fairly useful feature like this one.
> 
> It depends, features are not necessarily useful without users.
Agreed, I will make this as part of my series.

Thanks,
Marcel

> 
> Paolo






reply via email to

[Prev in Thread] Current Thread [Next in Thread]