]> granicus.if.org Git - strace/commitdiff
file_ioctl: make abbreviated output more structured
authorEugene Syromyatnikov <evgsyr@gmail.com>
Mon, 19 Mar 2018 04:24:16 +0000 (05:24 +0100)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 20 Apr 2018 12:39:05 +0000 (12:39 +0000)
* file_ioctl.c (file_ioctl): Print fm_extents field name only in case
of non-abbreviated output.
* tests/btrfs.c (btrfs_test_ino_path_ioctls): Update expected output.

file_ioctl.c
tests/btrfs.c

index 51b88f179ccd994a20feac10f6d77bb41a5a5df5..ba56c93a116e29aab70daee3635025304e9ce406 100644 (file)
@@ -225,11 +225,11 @@ file_ioctl(struct tcb *const tcp, const unsigned int code,
                             "FIEMAP_FLAG_???");
                tprintf(", fm_mapped_extents=%u",
                        args.fm_mapped_extents);
-               tprints(", fm_extents=");
                if (abbrev(tcp)) {
-                       tprints("...");
+                       tprints("...");
                } else {
                        struct fiemap_extent fe;
+                       tprints(", fm_extents=");
                        print_array(tcp,
                                    arg + offsetof(typeof(args), fm_extents),
                                    args.fm_mapped_extents, &fe, sizeof(fe),
index aed6d7027bbfe2bec1d5ce28cf483dbf9e1efafc..b0d23ef1863fd679b587c1a60a794fd47baf2fbc 100644 (file)
@@ -1357,10 +1357,10 @@ btrfs_test_ino_path_ioctls(void)
                ioctl(fd, FS_IOC_FIEMAP, fiemap);
                printf(" => {fm_flags=");
                prfl_btrfs(fiemap_flags, fiemap->fm_flags, "FIEMAP_FLAG_???");
-               printf(", fm_mapped_extents=%u, fm_extents=",
+               printf(", fm_mapped_extents=%u, ",
                        fiemap->fm_mapped_extents);
                if (verbose) {
-                       printf("[");
+                       printf("fm_extents=[");
                        unsigned int i;
                        for (i = 0; i < fiemap->fm_mapped_extents; i++) {
                                struct fiemap_extent *fe;