From 2f903295293f72f88639a3c0e97a3b028aa89415 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Fri, 27 Jan 2006 14:47:15 +0100 Subject: [PATCH] [PATCH] Need to still use outputname to check no_stdout --- blktrace.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/blktrace.c b/blktrace.c index 3185684..1ddcd83 100644 --- a/blktrace.c +++ b/blktrace.c @@ -740,26 +740,29 @@ static void show_stats(void) struct thread_information *tip; unsigned long long events_processed; unsigned long total_drops; - int i, j; + int i, j, no_stdout = 0; if (is_stat_shown()) return; + if (output_name && !strcmp(output_name, "-")) + no_stdout = 1; + stat_shown = 1; total_drops = 0; for_each_dip(dip, i) { - if (!tip->ofile_stdout) + if (!no_stdout) printf("Device: %s\n", dip->path); events_processed = 0; for_each_tip(dip, tip, j) { - if (!tip->ofile_stdout) + if (!no_stdout) printf(" CPU%3d: %20ld events\n", tip->cpu, tip->events_processed); events_processed += tip->events_processed; } total_drops += dip->drop_count; - if (!tip->ofile_stdout) + if (!no_stdout) printf(" Total: %20lld events (dropped %lu)\n", events_processed, dip->drop_count); } -- 2.25.1