[PATCH] Need to still use outputname to check no_stdout
authorJens Axboe <axboe@suse.de>
Fri, 27 Jan 2006 13:47:15 +0000 (14:47 +0100)
committerJens Axboe <axboe@suse.de>
Fri, 27 Jan 2006 13:47:15 +0000 (14:47 +0100)
blktrace.c

index 318568451fb0bf575746b44bc0d14ace743c4971..1ddcd83b8ce356ef14ad3d84600b37bc26b4e966 100644 (file)
@@ -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);
        }