From: Dmitry V. Levin Date: Sun, 29 May 2016 22:34:30 +0000 (+0000) Subject: loop.c: fix printing of arrays X-Git-Tag: v4.12~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b7166a6f28cf3c3e2ec6cdd1e41b3f773351d899;p=strace loop.c: fix printing of arrays * loop.c (decode_loop_info): Use square brackets to print struct loop_info.lo_init and struct loop_info.reserved arrays. (decode_loop_info64): Use square brackets to print struct loop_info64.lo_init array. --- diff --git a/loop.c b/loop.c index 33773368..ac092b50 100644 --- a/loop.c +++ b/loop.c @@ -73,8 +73,8 @@ decode_loop_info(struct tcb *tcp, const long addr) } if (!abbrev(tcp)) - tprintf(", lo_init={%#lx, %#lx}" - ", reserved={%#x, %#x, %#x, %#x}}", + tprintf(", lo_init=[%#lx, %#lx]" + ", reserved=[%#x, %#x, %#x, %#x]}", info.lo_init[0], info.lo_init[1], info.reserved[0], info.reserved[1], info.reserved[2], info.reserved[3]); @@ -132,7 +132,7 @@ decode_loop_info64(struct tcb *tcp, const long addr) } if (!abbrev(tcp)) - tprintf(", lo_init={%#" PRIx64 ", %#" PRIx64 "}}", + tprintf(", lo_init=[%#" PRIx64 ", %#" PRIx64 "]}", (uint64_t) info64.lo_init[0], (uint64_t) info64.lo_init[1]); else