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). > > Signed-off-by: Dimitris Aragiorgis <dim...@arrikto.com> > --- > block/raw-posix.c | 26 ++++++++++++++++++-------- > 1 file changed, 18 insertions(+), 8 deletions(-) >
> @@ -1040,8 +1049,9 @@ static int xfs_discard(BDRVRawState *s, int64_t offset, > uint64_t bytes) > fl.l_len = bytes; > > if (xfsctl(NULL, s->fd, XFS_IOC_UNRESVSP64, &fl) < 0) { > - DEBUG_BLOCK_PRINT("cannot punch hole (%s)\n", strerror(errno)); > - return -errno; > + err = 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 <ebl...@redhat.com> -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature