From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53125) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WG1C5-0005Zz-63 for qemu-devel@nongnu.org; Wed, 19 Feb 2014 02:03:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WG1Bz-0002TF-6e for qemu-devel@nongnu.org; Wed, 19 Feb 2014 02:03:45 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53424) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WG1By-0002Sq-Ui for qemu-devel@nongnu.org; Wed, 19 Feb 2014 02:03:39 -0500 Message-ID: <1392793428.3076.14.camel@localhost.localdomain> From: Marcel Apfelbaum Date: Wed, 19 Feb 2014 09:03:48 +0200 In-Reply-To: <530397BD.6090905@redhat.com> References: <1392741987-6356-1-git-send-email-marcel.a@redhat.com> <53038F97.6070000@redhat.com> <1392743460.3076.10.camel@localhost.localdomain> <530397BD.6090905@redhat.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] qom: add object_property_is_set List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: peter.crosthwaite@xilinx.com, mst@redhat.com, qemu-devel@nongnu.org, anthony@codemonkey.ws, imammedo@redhat.com, afaerber@suse.de 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