On Fri, May 27, 2016 at 04:07:22PM -0400, Jeff Mahoney wrote:
> * file_ioctl.c (file_ioctl, print_file_dedupe_range_info): print first
> two elements of info array in abbrev mode
> * tests/btrfs.c (btrfs_test_extent_same_ioctl): handle newly
> printed elements
> ---
> file_ioctl.c | 31 +++++++++++++++----------
> tests/btrfs.c | 74
> ++++++++++++++++++++++++++++++++++++++---------------------
> 2 files changed, 67 insertions(+), 38 deletions(-)
>
> diff --git a/file_ioctl.c b/file_ioctl.c
> index b065db9..95e526d 100644
> --- a/file_ioctl.c
> +++ b/file_ioctl.c
> @@ -80,6 +80,7 @@ print_file_dedupe_range_info(struct tcb *tcp, void
> *elem_buf,
> size_t elem_size, void *data)
> {
> const struct file_dedupe_range_info *info = elem_buf;
> + int *count = data;
>
> if (entering(tcp)) {
> tprints("{dest_fd=");
> @@ -91,6 +92,11 @@ print_file_dedupe_range_info(struct tcb *tcp, void
> *elem_buf,
> (uint64_t) info->bytes_deduped, info->status);
> }
>
> + if (count && --*count == 0) {
> + tprints(", ...");
> + return false;
> + }As we mostly print ellipsis when we sure that there is something to print, I've slightly changed this check so it prints ellipsis when *count is zero before the decrement. -- ldv
pgp477XAwNL4S.pgp
Description: PGP signature
------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________ Strace-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/strace-devel
