Commit a4ea67bc authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by Greg Kroah-Hartman

scripts: get_abi.pl: prevent duplicated file names

The same filename may exist on multiple directories within
ABI. Create separate entries at the internal database for
each of them.
Acked-by: default avatarJonathan Corbet <corbet@lwn.net>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/ef760f68f54e132c4be52f0027189b4ba31554ec.1604042072.git.mchehab+huawei@kernel.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a16ab14e
......@@ -65,7 +65,10 @@ sub parse_abi {
my $name = $file;
$name =~ s,.*/,,;
my $nametag = "File $name";
my $fn = $file;
$fn =~ s,Documentation/ABI/,,;
my $nametag = "File $fn";
$data{$nametag}->{what} = "File $name";
$data{$nametag}->{type} = "File";
$data{$nametag}->{file} = $name;
......@@ -320,16 +323,18 @@ sub output_rest {
my $fileref = "abi_file_".$path;
if ($type eq "File") {
my $bar = $w;
$bar =~ s/./-/g;
print ".. _$fileref:\n\n";
print "$w\n$bar\n\n";
} else {
print "Defined on file :ref:`$f <$fileref>`\n\n";
}
}
if ($type eq "File") {
my $bar = $w;
$bar =~ s/./-/g;
print "$w\n$bar\n\n";
}
my $desc = "";
$desc = $data{$what}->{description} if (defined($data{$what}->{description}));
$desc =~ s/\s+$/\n/;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment