[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 3/5] raw-posix: DPRINTF instead of DEBUG_BLOC
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v4 3/5] raw-posix: DPRINTF instead of DEBUG_BLOCK_PRINT |
Date: |
Thu, 18 Jun 2015 14:05:28 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 |
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 <address@hidden>
> ---
> 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 <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH v4 3/5] raw-posix: DPRINTF instead of DEBUG_BLOCK_PRINT,
Eric Blake <=