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
