From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41774) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YrqwU-0001i3-Q9 for qemu-devel@nongnu.org; Mon, 11 May 2015 12:52:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YrqwT-0007mp-VK for qemu-devel@nongnu.org; Mon, 11 May 2015 12:52:34 -0400 Message-ID: <5550DE46.8090907@redhat.com> Date: Mon, 11 May 2015 10:52:22 -0600 From: Eric Blake MIME-Version: 1.0 References: <1431107242-31947-1-git-send-email-dimara@arrikto.com> <1431107242-31947-4-git-send-email-dimara@arrikto.com> <554D1837.10505@redhat.com> In-Reply-To: <554D1837.10505@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="fVI5usprUjKSLrDxNo0keBJIag2U1dHsA" Subject: Re: [Qemu-devel] [PATCH v2 3/5] raw-posix: DPRINTF instead of DEBUG_BLOCK_PRINT List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Dimitris Aragiorgis , qemu-devel@nongnu.org Cc: kwolf@redhat.com, pbonzini@redhat.com, stefanha@redhat.com, qemu-block@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --fVI5usprUjKSLrDxNo0keBJIag2U1dHsA Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/08/2015 02:10 PM, Eric Blake wrote: > On 05/08/2015 11:47 AM, Dimitris Aragiorgis wrote: >> Building the QEMU tools fails if we #define DEBUG_BLOCK inside >> block/raw-posix.c. Here instead of adding qemu-log.o in block-obj-y >> so that DEBUG_BLOCK_PRINT can be used, we substitute the latter with >> a simple DPRINTF(). >> > Please fix this to ensure that we avoid bit-rot even when debugging is > not turned on. Something like: >=20 > #ifdef DEBUG_BLOCK > # define DEBUG_BLOCK_PRINT 1 > #else > # define DEBUG_BLOCK_PRINT 0 > #endif > #define DPRINTF(fmt, ...) \ > do \ > if (DEBUG_BLOCK_PRINT) { \ > printf(fmt, ## __VA_ARGS__); \ > while (0) Obviously, with the missing } that allows compilation :) --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --fVI5usprUjKSLrDxNo0keBJIag2U1dHsA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVUN5GAAoJEKeha0olJ0NqHwkH/0fol/878tNo+tmNpblmZ6Yy 7KRotDSV+WQ0+Tb9omb2hioZvLEsy0S529j0Z+z2fZLY7yze2spbejJw5NAFZ8Tg nSSUr+7t1LC0vZnW0RsW28wv/y6NNcdLM8Fn1Udh8S+mrR0hekgNAz/M4B0KZidy 4/3t/wNxIWiQOO1i/3nDf7lhIUSMZSslSJxCrdqssrrQVOdAy9YhZs+dPn2x+Reu zhfD4TUB9Bdu0kCwakbDmurvhD9nPngv8Mshf8DlrRaXkgcDE3Y1Vi+sjBtS2KjG vywKDOxkOj2zii+ONyDqWZk2fM+aDjs5dPU5YGDc7JSnn6u6PnZMiPb2ef+hBHg= =F7xU -----END PGP SIGNATURE----- --fVI5usprUjKSLrDxNo0keBJIag2U1dHsA--