From a286680b04ca8568e8c79be129a8198c45fc8b0b Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Sat, 7 Jan 2017 16:44:44 +0000 Subject: [PATCH] aio: print hexadecimal integer using %#x The formerly used format string %x led to misleading output as there was no clear indication sometimes whether the printed integer was decimal or hexadecimal. * aio.c (print_common_flags): Print struct iocb.aio_flags using %#x format specifier instead of %x. * tests/aio.c (main): Likewise. --- aio.c | 2 +- tests/aio.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/aio.c b/aio.c index 47a4038a..e246b353 100644 --- a/aio.c +++ b/aio.c @@ -87,7 +87,7 @@ print_common_flags(struct tcb *tcp, const struct iocb *cb) printfd(tcp, cb->aio_resfd); } if (cb->aio_flags & ~IOCB_FLAG_RESFD) - tprintf(", flags=%x", cb->aio_flags); + tprintf(", flags=%#x", cb->aio_flags); #endif } diff --git a/tests/aio.c b/tests/aio.c index 5b0c1aaf..0766d23a 100644 --- a/tests/aio.c +++ b/tests/aio.c @@ -301,7 +301,7 @@ main(void) "{key=%u, pwrite, reqprio=%hd, fildes=%d, str=NULL" ", nbytes=%" PRI__u64 ", offset=%" PRI__d64 # ifdef IOCB_FLAG_RESFD - ", resfd=%d, flags=%x" + ", resfd=%d, flags=%#x" # endif "}, " "{key=%u, pwrite, reqprio=%hd, fildes=%d, buf=%#" PRI__x64 -- 2.40.0