]> granicus.if.org Git - strace/commitdiff
loop.c: fix printing of arrays
authorDmitry V. Levin <ldv@altlinux.org>
Sun, 29 May 2016 22:34:30 +0000 (22:34 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sun, 29 May 2016 22:34:30 +0000 (22:34 +0000)
* 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.

loop.c

diff --git a/loop.c b/loop.c
index 33773368d7c6e5de158c63a3fc29138b8e5f4455..ac092b50c823aa25ef94f855ca078754a9a84687 100644 (file)
--- 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