From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49991) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T6tyV-0008G2-U9 for qemu-devel@nongnu.org; Wed, 29 Aug 2012 21:55:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T6tyU-0004xn-Ur for qemu-devel@nongnu.org; Wed, 29 Aug 2012 21:55:15 -0400 Received: from e28smtp06.in.ibm.com ([122.248.162.6]:57675) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T6tyU-0004r1-Ah for qemu-devel@nongnu.org; Wed, 29 Aug 2012 21:55:14 -0400 Received: from /spool/local by e28smtp06.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 30 Aug 2012 07:25:06 +0530 Received: from d28av05.in.ibm.com (d28av05.in.ibm.com [9.184.220.67]) by d28relay05.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q7U1t1ug6029700 for ; Thu, 30 Aug 2012 07:25:03 +0530 Received: from d28av05.in.ibm.com (loopback [127.0.0.1]) by d28av05.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q7U1t1S2018689 for ; Thu, 30 Aug 2012 11:55:01 +1000 Message-ID: <503EC7A4.7070209@linux.vnet.ibm.com> Date: Thu, 30 Aug 2012 09:53:40 +0800 From: Wenchao Xia MIME-Version: 1.0 References: <1346238199-24425-1-git-send-email-xiawenc@linux.vnet.ibm.com> <503DF923.9030009@redhat.com> In-Reply-To: <503DF923.9030009@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v3 1/5] [RFC] libqblock, API design List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: kwolf@redhat.com, aliguori@us.ibm.com, stefanha@gmail.com, qemu-devel@nongnu.org, blauwirbel@gmail.com, eblake@redhat.com, afaerber@suse.de 于 2012-8-29 19:12, Paolo Bonzini 写道: > Il 29/08/2012 13:03, Wenchao Xia ha scritto: > >> +struct QBlockOption_prot_file { >> + char *filename; >> +}; >> + >> +union QBlockOption_prot { >> + struct QBlockOption_prot_file o_file; >> +}; >> + >> +/** >> + * struct QBlockOptionLoc: contains information about how to find the image >> + * >> + * @prot_type: protocol type, now only support FILE. >> + * @prot_op: protocol related options. >> + */ >> +struct QBlockOptionLoc { >> + enum QBlockProtocol prot_type; >> + union QBlockOption_prot prot_op; >> + uint8_t reserved[512]; > > The padding must be part of the union, not the struct. > > Paolo > right. I missed the point. -- Best Regards Wenchao Xia