From: Dmitry V. Levin Date: Sat, 7 Jan 2017 16:44:44 +0000 (+0000) Subject: aio: print hexadecimal integer using %#x X-Git-Tag: v4.16~84 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a286680b04ca8568e8c79be129a8198c45fc8b0b;p=strace 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. --- 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