@@ -163,7 +163,7 @@ our $convert_filenames; # If set, convert filenames when applying diff
163
163
our $strip ; # If set, strip leading directories when applying diff
164
164
our $temp_dir_name ; # Name of temporary directory
165
165
our $cwd = ` pwd` ; # Current working directory
166
- our $to_file ; # If set, indicates that output is written to a file
166
+ our $data_stdout ; # If set, indicates that data is written to stdout
167
167
our $follow ; # If set, indicates that find shall follow links
168
168
our $diff_path = " " ; # Path removed from tracefile when applying diff
169
169
our $base_directory ; # Base directory (cwd of gcc during compilation)
@@ -387,11 +387,11 @@ if (@ARGV && !($extract || $remove || $diff || @opt_summary))
387
387
}
388
388
389
389
# Check for output filename
390
- $to_file = ($output_filename && ($output_filename ne " -" ));
390
+ $data_stdout = ! ($output_filename && ($output_filename ne " -" ));
391
391
392
392
if ($capture )
393
393
{
394
- if (! $to_file )
394
+ if ($data_stdout )
395
395
{
396
396
# Option that tells geninfo to write to stdout
397
397
$output_filename = " -" ;
@@ -406,6 +406,7 @@ if (!$from_package && !@directory && ($capture || $reset)) {
406
406
# Check for requested functionality
407
407
if ($reset )
408
408
{
409
+ $data_stdout = 0;
409
410
# Differentiate between user space and kernel reset
410
411
if (@directory )
411
412
{
@@ -455,6 +456,7 @@ elsif ($extract)
455
456
}
456
457
elsif ($list )
457
458
{
459
+ $data_stdout = 0;
458
460
list();
459
461
}
460
462
elsif ($diff )
@@ -470,6 +472,7 @@ elsif ($diff)
470
472
}
471
473
elsif (@opt_summary )
472
474
{
475
+ $data_stdout = 0;
473
476
($ln_overall_found , $ln_overall_hit ,
474
477
$fn_overall_found , $fn_overall_hit ,
475
478
$br_overall_found , $br_overall_hit ) = summary();
@@ -1456,7 +1459,7 @@ sub info(@)
1456
1459
if (!$quiet )
1457
1460
{
1458
1461
# Print info string
1459
- if ($to_file )
1462
+ if (! $data_stdout )
1460
1463
{
1461
1464
printf (@_ )
1462
1465
}
@@ -2645,7 +2648,7 @@ sub add_traces()
2645
2648
}
2646
2649
2647
2650
# Write combined data
2648
- if ($to_file )
2651
+ if (! $data_stdout )
2649
2652
{
2650
2653
info(" Writing data to $output_filename \n " );
2651
2654
open (INFO_HANDLE, " >" , $output_filename )
@@ -2875,7 +2878,7 @@ sub extract()
2875
2878
}
2876
2879
2877
2880
# Write extracted data
2878
- if ($to_file )
2881
+ if (! $data_stdout )
2879
2882
{
2880
2883
info(" Extracted $extracted files\n " );
2881
2884
info(" Writing data to $output_filename \n " );
@@ -2931,7 +2934,7 @@ sub remove()
2931
2934
}
2932
2935
2933
2936
# Write data
2934
- if ($to_file )
2937
+ if (! $data_stdout )
2935
2938
{
2936
2939
info(" Deleted $removed files\n " );
2937
2940
info(" Writing data to $output_filename \n " );
@@ -4065,7 +4068,7 @@ sub diff()
4065
4068
" unchanged.\n " );
4066
4069
4067
4070
# Write data
4068
- if ($to_file )
4071
+ if (! $data_stdout )
4069
4072
{
4070
4073
info(" Writing data to $output_filename \n " );
4071
4074
open (INFO_HANDLE, " >" , $output_filename )
0 commit comments