From: Eugene Syromyatnikov Date: Mon, 19 Mar 2018 04:24:16 +0000 (+0100) Subject: file_ioctl: make abbreviated output more structured X-Git-Tag: v4.23~293 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a2b07d60d7e5f30a15f90aaebfc881556ded0843;p=strace file_ioctl: make abbreviated output more structured * 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. --- diff --git a/file_ioctl.c b/file_ioctl.c index 51b88f17..ba56c93a 100644 --- a/file_ioctl.c +++ b/file_ioctl.c @@ -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), diff --git a/tests/btrfs.c b/tests/btrfs.c index aed6d702..b0d23ef1 100644 --- a/tests/btrfs.c +++ b/tests/btrfs.c @@ -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;