]> xenbits.xensource.com Git - libvirt.git/commitdiff
Remove duplicate symbols and add test case
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 6 Sep 2012 14:45:57 +0000 (15:45 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 6 Sep 2012 15:05:41 +0000 (16:05 +0100)
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

src/check-symfile.pl
src/libvirt_private.syms

index 454fed3260796b1d61dfbbb6c095e7b5bd57fd42..c0b7ec75735ce49df32b4808bc732fb036f4c154 100755 (executable)
@@ -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};
 
index abfee47afc0f80f19f7d2a20034cb3b1a28621d5..9971befdd26c6776890f02829616099befa2d2eb 100644 (file)
@@ -1178,8 +1178,6 @@ virDirCreate;
 virDoubleToStr;
 virEnumFromString;
 virEnumToString;
-virEventAddHandle;
-virEventRemoveHandle;
 virFileAbsPath;
 virFileAccessibleAs;
 virFileBuildPath;