From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39978) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5g4N-0001hT-FZ for qemu-devel@nongnu.org; Thu, 18 Jun 2015 16:05:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z5g4L-0007dm-Va for qemu-devel@nongnu.org; Thu, 18 Jun 2015 16:05:51 -0400 Message-ID: <55832488.1040805@redhat.com> Date: Thu, 18 Jun 2015 14:05:28 -0600 From: Eric Blake MIME-Version: 1.0 References: <1432115859-11413-1-git-send-email-dimara@arrikto.com> <1432115859-11413-4-git-send-email-dimara@arrikto.com> In-Reply-To: <1432115859-11413-4-git-send-email-dimara@arrikto.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="VCMmXGxls30tswPkQjNk6gLEfRLVnVfMf" Subject: Re: [Qemu-devel] [PATCH v4 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) --VCMmXGxls30tswPkQjNk6gLEfRLVnVfMf Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/20/2015 03:57 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() (that does not cause bit-rot). >=20 > Signed-off-by: Dimitris Aragiorgis > --- > block/raw-posix.c | 26 ++++++++++++++++++-------- > 1 file changed, 18 insertions(+), 8 deletions(-) >=20 > @@ -1040,8 +1049,9 @@ static int xfs_discard(BDRVRawState *s, int64_t o= ffset, uint64_t bytes) > fl.l_len =3D bytes; > =20 > if (xfsctl(NULL, s->fd, XFS_IOC_UNRESVSP64, &fl) < 0) { > - DEBUG_BLOCK_PRINT("cannot punch hole (%s)\n", strerror(errno))= ; > - return -errno; > + err =3D errno; > + DPRINTF("cannot punch hole (%s)\n", strerror(errno)); > + return -err; Could use strerror(err) to shave two source bytes, but doesn't change correctness, so: Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --VCMmXGxls30tswPkQjNk6gLEfRLVnVfMf 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/ iQEcBAEBCAAGBQJVgySIAAoJEKeha0olJ0Nqom4H/16lmmTQV+Ztoig80Men+oYX gytc5EHnblzgPCTw9+kbe95YuNwE/SKuGprmFEJCbrny3TiTJW9tIyDBE5JCaXMW UkYzNXLr1/JCwJH418a4d1MKIOKGr4AvCW9sbZS8+VjmkjJw6WlOfAu07zpRC7OV Rq8N8PxYQnuI+Em9vqlapbtI387kq4RRpJfXt1vNUKjU0HxBuLzt/O11ztIVhXOw HK2WfEEdCBqiWcmN7oEmUZ/4G/BCySIzi1TvT2SSu8uXA0wI3zxPJszXn8GulJrK rs7XsnRrBaYVRc3hw6Zo9ErGudS4JPIF8p3X8erVoWD37AHZ/7390kaCzkKpEfk= =r4jX -----END PGP SIGNATURE----- --VCMmXGxls30tswPkQjNk6gLEfRLVnVfMf--