]> granicus.if.org Git - strace/commitdiff
btrfs: duplicate printing of opening braces on entering/exiting
authorEugene Syromyatnikov <evgsyr@gmail.com>
Sat, 17 Mar 2018 05:38:08 +0000 (06:38 +0100)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 20 Apr 2018 12:39:05 +0000 (12:39 +0000)
* btrfs.c (MPERS_PRINTER_DECL(btrfs_ioctl)): Print opening bracket
on entering and exiting separately.

btrfs.c

diff --git a/btrfs.c b/btrfs.c
index fe9b9f7d28ab00471c6d09b9bf66c5c10a885759..1eb8b55af575c2ae6c76966a42095d1d05c25d45 100644 (file)
--- a/btrfs.c
+++ b/btrfs.c
@@ -620,11 +620,10 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
                        tprints(" => ");
                if (umove_or_printaddr(tcp, arg, &args))
                        break;
-               tprints("{");
 
                valid = btrfs_unparse_uuid(args.uuid, uuid);
                if (entering(tcp)) {
-                       tprintf("devid=%" PRI__u64, args.devid);
+                       tprintf("{devid=%" PRI__u64, args.devid);
                        if (valid)
                                tprintf(", uuid=%s", uuid);
                        tprints("}");
@@ -900,10 +899,8 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
                if (umove_or_printaddr(tcp, arg, &args))
                        break;
 
-               tprints("{");
-
                if (entering(tcp)) {
-                       tprintf("inum=%" PRI__u64 ", size=%" PRI__u64,
+                       tprintf("{inum=%" PRI__u64 ", size=%" PRI__u64,
                                args.inum, args.size);
                        tprints(", fspath=");
                        printaddr64(args.fspath);
@@ -911,7 +908,7 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
                        return 0;
                }
 
-               tprints("fspath=");
+               tprints("{fspath=");
                btrfs_print_ino_path_container(tcp, args.fspath);
 
                tprints("}");
@@ -931,10 +928,8 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
                if (umove_or_printaddr(tcp, arg, &args))
                        break;
 
-               tprints("{");
-
                if (entering(tcp)) {
-                       tprintf("logical=%" PRI__u64 ", size=%" PRI__u64,
+                       tprintf("{logical=%" PRI__u64 ", size=%" PRI__u64,
                                args.logical, args.size);
 
                        if (!IS_ARRAY_ZERO(args.reserved)) {
@@ -960,7 +955,7 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
                        return 0;
                }
 
-               tprints("inodes=");
+               tprints("{inodes=");
                btrfs_print_logical_ino_container(tcp, args.inodes);
 
                tprints("}");
@@ -1237,13 +1232,12 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl,
                if (umove_or_printaddr(tcp, arg, &args))
                        break;
 
-               tprints("{");
                if (entering(tcp)) {
-                       tprintf("space_slots=%" PRI__u64 "}", args.space_slots);
+                       tprintf("{space_slots=%" PRI__u64 "}", args.space_slots);
                        return 0;
                }
 
-               tprintf("total_spaces=%" PRI__u64, args.total_spaces);
+               tprintf("{total_spaces=%" PRI__u64, args.total_spaces);
 
                if (args.space_slots == 0 && args.total_spaces) {
                        tprints("}");