1 |
vapier 11/12/21 17:34:12 |
2 |
|
3 |
Modified: scanelf.c |
4 |
Log: |
5 |
support ! negation with the -N (SONAME) operator |
6 |
|
7 |
Revision Changes Path |
8 |
1.236 pax-utils/scanelf.c |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/scanelf.c?rev=1.236&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/scanelf.c?rev=1.236&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/scanelf.c?r1=1.235&r2=1.236 |
13 |
|
14 |
Index: scanelf.c |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-projects/pax-utils/scanelf.c,v |
17 |
retrieving revision 1.235 |
18 |
retrieving revision 1.236 |
19 |
diff -u -r1.235 -r1.236 |
20 |
--- scanelf.c 13 Dec 2011 05:12:14 -0000 1.235 |
21 |
+++ scanelf.c 21 Dec 2011 17:34:12 -0000 1.236 |
22 |
@@ -1,13 +1,13 @@ |
23 |
/* |
24 |
* Copyright 2003-2007 Gentoo Foundation |
25 |
* Distributed under the terms of the GNU General Public License v2 |
26 |
- * $Header: /var/cvsroot/gentoo-projects/pax-utils/scanelf.c,v 1.235 2011/12/13 05:12:14 vapier Exp $ |
27 |
+ * $Header: /var/cvsroot/gentoo-projects/pax-utils/scanelf.c,v 1.236 2011/12/21 17:34:12 vapier Exp $ |
28 |
* |
29 |
* Copyright 2003-2007 Ned Ludd - <solar@g.o> |
30 |
* Copyright 2004-2007 Mike Frysinger - <vapier@g.o> |
31 |
*/ |
32 |
|
33 |
-static const char rcsid[] = "$Id: scanelf.c,v 1.235 2011/12/13 05:12:14 vapier Exp $"; |
34 |
+static const char rcsid[] = "$Id: scanelf.c,v 1.236 2011/12/21 17:34:12 vapier Exp $"; |
35 |
const char argv0[] = "scanelf"; |
36 |
|
37 |
#include "paxinc.h" |
38 |
@@ -971,9 +971,13 @@ |
39 |
size_t n; \ |
40 |
const char *find_lib_name; \ |
41 |
\ |
42 |
- array_for_each(find_lib_arr, n, find_lib_name) \ |
43 |
- if (!strcmp(find_lib_name, needed)) \ |
44 |
+ array_for_each(find_lib_arr, n, find_lib_name) { \ |
45 |
+ int invert = 1; \ |
46 |
+ if (find_lib_name[0] == '!') \ |
47 |
+ invert = 0, ++find_lib_name; \ |
48 |
+ if (!strcmp(find_lib_name, needed) == invert) \ |
49 |
++matched; \ |
50 |
+ } \ |
51 |
\ |
52 |
if (matched == array_cnt(find_lib_arr)) { \ |
53 |
*found_lib = 1; \ |