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

scripts: get_api.pl: Add sub-titles to ABI output

Instead of adding titles just for the files, add titles
for each part of the ABI output, in order to make easier
to search for a symbol there.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/64752a5de06ab8263c296e3ed01414b25861e1eb.1604312590.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
9d4fdda3 daaaf58a

+17
+17
scripts/get_abi.pl
··· 287 287 sub output_rest { 288 288 create_labels(); 289 289 290 + my $part = ""; 291 + 290 292 foreach my $what (sort { 291 293 ($data{$a}->{type} eq "File") cmp ($data{$b}->{type} eq "File") || 292 294 $a cmp $b ··· 308 306 $w =~ s/([\(\)\_\-\*\=\^\~\\])/\\$1/g; 309 307 310 308 if ($type ne "File") { 309 + my $cur_part = $what; 310 + if ($what =~ '/') { 311 + if ($what =~ m#^(\/?(?:[\w\-]+\/?){1,2})#) { 312 + $cur_part = "Symbols under $1"; 313 + $cur_part =~ s,/$,,; 314 + } 315 + } 316 + 317 + if ($cur_part ne "" && $part ne $cur_part) { 318 + $part = $cur_part; 319 + my $bar = $part; 320 + $bar =~ s/./-/g; 321 + print "$part\n$bar\n\n"; 322 + } 323 + 311 324 printf ".. _%s:\n\n", $data{$what}->{label}; 312 325 313 326 my @names = split /, /,$w;