/[gentoo-projects]/pax-utils/scanelf.c
Gentoo

Diff of /pax-utils/scanelf.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.132 Revision 1.133
1/* 1/*
2 * Copyright 2003-2006 Gentoo Foundation 2 * Copyright 2003-2006 Gentoo Foundation
3 * Distributed under the terms of the GNU General Public License v2 3 * Distributed under the terms of the GNU General Public License v2
4 * $Header: /var/cvsroot/gentoo-projects/pax-utils/scanelf.c,v 1.132 2006/03/07 17:48:17 solar Exp $ 4 * $Header: /var/cvsroot/gentoo-projects/pax-utils/scanelf.c,v 1.133 2006/03/08 05:32:53 vapier Exp $
5 * 5 *
6 * Copyright 2003-2006 Ned Ludd - <solar@gentoo.org> 6 * Copyright 2003-2006 Ned Ludd - <solar@gentoo.org>
7 * Copyright 2004-2006 Mike Frysinger - <vapier@gentoo.org> 7 * Copyright 2004-2006 Mike Frysinger - <vapier@gentoo.org>
8 */ 8 */
9 9
10#include "paxinc.h" 10#include "paxinc.h"
11 11
12static const char *rcsid = "$Id: scanelf.c,v 1.132 2006/03/07 17:48:17 solar Exp $"; 12static const char *rcsid = "$Id: scanelf.c,v 1.133 2006/03/08 05:32:53 vapier Exp $";
13#define argv0 "scanelf" 13#define argv0 "scanelf"
14 14
15#define IS_MODIFIER(c) (c == '%' || c == '#' || c == '+') 15#define IS_MODIFIER(c) (c == '%' || c == '#' || c == '+')
16 16
17 17
1234 } 1234 }
1235 } 1235 }
1236 closedir(dir); 1236 closedir(dir);
1237} 1237}
1238 1238
1239static int scanelf_from_file(char *filename) 1239static int scanelf_from_file(const char *filename)
1240{ 1240{
1241 FILE *fp = NULL; 1241 FILE *fp = NULL;
1242 char *p; 1242 char *p;
1243 char path[__PAX_UTILS_PATH_MAX]; 1243 char path[__PAX_UTILS_PATH_MAX];
1244 1244
1475 1475
1476/* parse command line arguments and preform needed actions */ 1476/* parse command line arguments and preform needed actions */
1477static void parseargs(int argc, char *argv[]) 1477static void parseargs(int argc, char *argv[])
1478{ 1478{
1479 int i; 1479 int i;
1480 char *from_file = NULL; 1480 const char *from_file = NULL;
1481 1481
1482 opterr = 0; 1482 opterr = 0;
1483 while ((i=getopt_long(argc, argv, PARSE_FLAGS, long_opts, NULL)) != -1) { 1483 while ((i=getopt_long(argc, argv, PARSE_FLAGS, long_opts, NULL)) != -1) {
1484 switch (i) { 1484 switch (i) {
1485 1485
1663 if (scan_ldpath || use_ldcache) 1663 if (scan_ldpath || use_ldcache)
1664 load_ld_so_conf(0, "/etc/ld.so.conf"); 1664 load_ld_so_conf(0, "/etc/ld.so.conf");
1665 if (scan_ldpath) scanelf_ldpath(); 1665 if (scan_ldpath) scanelf_ldpath();
1666 if (scan_envpath) scanelf_envpath(); 1666 if (scan_envpath) scanelf_envpath();
1667 if (!from_file && ttyname(0) == NULL) 1667 if (!from_file && ttyname(0) == NULL)
1668 from_file = (char *) "-"; 1668 from_file = "-";
1669 if (from_file) { 1669 if (from_file) {
1670 scanelf_from_file(from_file); 1670 scanelf_from_file(from_file);
1671 from_file = *argv; 1671 from_file = *argv;
1672 } 1672 }
1673 if (optind == argc && !scan_ldpath && !scan_envpath && !from_file) 1673 if (optind == argc && !scan_ldpath && !scan_envpath && !from_file)

Legend:
Removed from v.1.132  
changed lines
  Added in v.1.133

  ViewVC Help
Powered by ViewVC 1.1.20