提交 f299ddd6 编写于 作者: D Daniel P. Berrange

Remove duplicate symbols and add test case

When the event symbols were added to the public API, not all
of them were removed from the private exports list. Solaris
gets unhappy when there are duplicated symbols. Extend the
symfile check to test for this scenario
上级 92785780
......@@ -5,9 +5,11 @@ die "syntax: $0 SYMFILE ELFLIB(S)" unless int(@ARGV) >= 2;
my $symfile = shift @ARGV;
my @elflibs = @ARGV;
my @wantsyms;
my %wantsyms;
my %gotsyms;
my $ret = 0;
open SYMFILE, $symfile or die "cannot read $symfile: $!";
while (<SYMFILE>) {
......@@ -21,7 +23,12 @@ while (<SYMFILE>) {
die "malformed line $_" unless /^\s*(\S+);$/;
push @wantsyms, $1;
if (exists $wantsyms{$1}) {
print STDERR "Symbol $1 is listed twice\n";
$ret = 1;
} else {
$wantsyms{$1} = 1;
}
}
close SYMFILE;
......@@ -37,8 +44,6 @@ foreach my $elflib (@elflibs) {
close NM;
}
my $ret = 0;
foreach my $sym (@wantsyms) {
next if exists $gotsyms{$sym};
......
......@@ -1178,8 +1178,6 @@ virDirCreate;
virDoubleToStr;
virEnumFromString;
virEnumToString;
virEventAddHandle;
virEventRemoveHandle;
virFileAbsPath;
virFileAccessibleAs;
virFileBuildPath;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册