From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52087) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4pce-0004kT-At for qemu-devel@nongnu.org; Tue, 06 Mar 2012 03:19:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S4pcW-00043v-Pc for qemu-devel@nongnu.org; Tue, 06 Mar 2012 03:19:51 -0500 Received: from e23smtp03.au.ibm.com ([202.81.31.145]:57027) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S4pcW-00042O-8e for qemu-devel@nongnu.org; Tue, 06 Mar 2012 03:19:44 -0500 Received: from /spool/local by e23smtp03.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 6 Mar 2012 08:11:29 +1000 Received: from d23av01.au.ibm.com (d23av01.au.ibm.com [9.190.234.96]) by d23relay04.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q268DlKL2486328 for ; Tue, 6 Mar 2012 19:13:47 +1100 Received: from d23av01.au.ibm.com (loopback [127.0.0.1]) by d23av01.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q268JMBA004076 for ; Tue, 6 Mar 2012 19:19:22 +1100 Message-ID: <4F55C887.3060600@linux.vnet.ibm.com> Date: Tue, 06 Mar 2012 16:19:19 +0800 From: Mark Wu MIME-Version: 1.0 References: <1330968842-24635-1-git-send-email-pbonzini@redhat.com> <1330968842-24635-3-git-send-email-pbonzini@redhat.com> <4F55B9D4.7070106@linux.vnet.ibm.com> <4F55C75F.90508@redhat.com> In-Reply-To: <4F55C75F.90508@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 2/8] qapi: complete implementation of unions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: kwolf@redhat.com, stefanha@linux.vnet.ibm.com, qemu-devel@nongnu.org, lcapitulino@redhat.com, fsimonce@redhat.com, eblake@redhat.com On 03/06/2012 04:14 PM, Paolo Bonzini wrote: > Il 06/03/2012 08:16, Mark Wu ha scritto: >> It seems we need a name for the union to reference its member. > What version is your compiler? > >> So I >> modified the scripts as the following patch. I also updated blockdev.c >> accordingly. After that I can compile it without error. Actually, I >> don't know why we need introduce a union for BlockdevAction. Can we just >> use a void pointer like "void *action_param" to replace the union? Or >> can we change the field ."snapshot_file to "target" too? Then they can >> share the same action parameter structure. > No, the struct must match the existing blockdev-snapshot-sync command. > > Paolo > gcc -v Using built-in specs. Target: x86_64-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux Thread model: posix gcc version 4.4.5 20110214 (Red Hat 4.4.5-6) (GCC)