From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58506) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sh0sU-0001fQ-Mi for qemu-devel@nongnu.org; Tue, 19 Jun 2012 12:02:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sh0sS-0003Kd-MK for qemu-devel@nongnu.org; Tue, 19 Jun 2012 12:02:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:22368) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sh0sS-0003KV-Eg for qemu-devel@nongnu.org; Tue, 19 Jun 2012 12:02:00 -0400 Message-ID: <4FE0A27A.4050602@redhat.com> Date: Tue, 19 Jun 2012 19:02:02 +0300 From: Orit Wasserman MIME-Version: 1.0 References: <1340120601-24747-1-git-send-email-owasserm@redhat.com> <1340120601-24747-2-git-send-email-owasserm@redhat.com> <4FE0A225.4080201@redhat.com> In-Reply-To: <4FE0A225.4080201@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v12 01/13] Add MigrationParams structure List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: peter.maydell@linaro.org, aliguori@us.ibm.com, quintela@redhat.com, stefanha@gmail.com, qemu-devel@nongnu.org, mdroth@linux.vnet.ibm.com, blauwirbel@gmail.com, Isaku Yamahata , avi@redhat.com, pbonzini@redhat.com, chegu_vinod@hp.com On 06/19/2012 07:00 PM, Eric Blake wrote: > On 06/19/2012 09:43 AM, Orit Wasserman wrote: >> From: Isaku Yamahata >> >> Signed-off-by: Isaku Yamahata >> --- > >> >> -static void block_set_params(int blk_enable, int shared_base, void *opaque) >> +static void block_set_params(const MigrationParams *params, void *opaque) > > As long as we are changing this signature... > >> @@ -394,9 +393,13 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk, >> Error **errp) >> { >> MigrationState *s = migrate_get_current(); >> + MigrationParams params; >> const char *p; >> int ret; >> >> + params.blk = blk; > > ...and since blk is only ever a bool to begin with... > >> >> +struct MigrationParams { >> + int blk; >> + int shared; > > ...why not use bool instead of int in this struct to represent the fact > that it really is a binary choice? I think the same can be said for shared. you right , I will fix it. Orit >