Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scripts: get_abi.pl: use STDERR for search-string and show-hints

On undefined checks, use STDOUT only for the not found entries.

All other data (search-string and show-hints) is printed at
STDERR.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/51c6a39c82f73b441030c51bf905a1f382452a67.1632823172.git.mchehab+huawei@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Mauro Carvalho Chehab and committed by
Greg Kroah-Hartman
2833e30a 42f09848

+7 -7
+7 -7
scripts/get_abi.pl
··· 728 728 for (my $i = 0; $i < @names; $i++) { 729 729 if ($found_string && $hint) { 730 730 if (!$i) { 731 - print "--> $names[$i]\n"; 731 + print STDERR "--> $names[$i]\n"; 732 732 } else { 733 - print " $names[$i]\n"; 733 + print STDERR " $names[$i]\n"; 734 734 } 735 735 } 736 736 foreach my $re (@expr) { ··· 760 760 } 761 761 next if ($exact); 762 762 763 + print "$file not found.\n" if (!$search_string || $found_string); 764 + 763 765 if ($hint && (!$search_string || $found_string)) { 764 766 my $what = $leaf{$leave}->{what}; 765 767 $what =~ s/\xac/\n\t/g; 766 768 if ($leave ne "others") { 767 - print " more likely regexes:\n\t$what\n"; 769 + print STDERR " more likely regexes:\n\t$what\n"; 768 770 } else { 769 - print " tested regexes:\n\t$what\n"; 771 + print STDERR " tested regexes:\n\t$what\n"; 770 772 } 771 - next; 772 773 } 773 - print "$file not found.\n" if (!$search_string || $found_string); 774 774 } 775 775 } 776 776 ··· 852 852 } 853 853 } 854 854 if ($search_string && $added) { 855 - print "What: $what\n" if ($what =~ m#$search_string#); 855 + print STDERR "What: $what\n" if ($what =~ m#$search_string#); 856 856 } 857 857 858 858 }