From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=59743 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PFkab-0008Va-EM for qemu-devel@nongnu.org; Tue, 09 Nov 2010 04:35:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PFkZO-0000uM-8C for qemu-devel@nongnu.org; Tue, 09 Nov 2010 04:34:00 -0500 Received: from mail-vw0-f45.google.com ([209.85.212.45]:53769) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PFkZO-0000uH-4W for qemu-devel@nongnu.org; Tue, 09 Nov 2010 04:32:50 -0500 Received: by vws4 with SMTP id 4so3087513vws.4 for ; Tue, 09 Nov 2010 01:32:49 -0800 (PST) Sender: Paolo Bonzini Message-ID: <4CD9153E.6060807@redhat.com> Date: Tue, 09 Nov 2010 10:32:46 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1288623114-14439-1-git-send-email-kraxel@redhat.com> <20101108174752.GC8498@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] add VMSTATE_BOOL List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: qemu-devel@nongnu.org, Gerd Hoffmann , "Michael S. Tsirkin" On 11/09/2010 10:23 AM, Markus Armbruster wrote: >>> +} >>> + >>> +static void put_bool(QEMUFile *f, void *pv, size_t size) >>> +{ >>> + bool *v = pv; >>> + qemu_put_byte(f, *v); >> >> Is there a guarantee that bool is a single byte, BTW? > > Nope. Does it matter? No. In fact I think QEMU makes (or tries to make) the QEMU dump format host-independent, and hence ABI-independent. So, writing a single byte is better than writing sizeof(bool) bytes. Paolo