| 1 | /* |
1 | /* |
| 2 | * Copyright 2003 Ned Ludd <solar@gentoo.org> |
2 | * Copyright 2003 Ned Ludd <solar@gentoo.org> |
| 3 | * Copyright 1999-2005 Gentoo Foundation |
3 | * Copyright 1999-2005 Gentoo Foundation |
| 4 | * Distributed under the terms of the GNU General Public License v2 |
4 | * Distributed under the terms of the GNU General Public License v2 |
| 5 | * $Header: /var/cvsroot/gentoo-projects/pax-utils/scanelf.c,v 1.24 2005/04/03 18:42:27 vapier Exp $ |
5 | * $Header: /var/cvsroot/gentoo-projects/pax-utils/scanelf.c,v 1.25 2005/04/03 18:56:08 vapier Exp $ |
| 6 | * |
6 | * |
| 7 | ******************************************************************** |
7 | ******************************************************************** |
| 8 | * This program is free software; you can redistribute it and/or |
8 | * This program is free software; you can redistribute it and/or |
| 9 | * modify it under the terms of the GNU General Public License as |
9 | * modify it under the terms of the GNU General Public License as |
| 10 | * published by the Free Software Foundation; either version 2 of the |
10 | * published by the Free Software Foundation; either version 2 of the |
| … | |
… | |
| 32 | #include <getopt.h> |
32 | #include <getopt.h> |
| 33 | #include <assert.h> |
33 | #include <assert.h> |
| 34 | |
34 | |
| 35 | #include "paxelf.h" |
35 | #include "paxelf.h" |
| 36 | |
36 | |
| 37 | static const char *rcsid = "$Id: scanelf.c,v 1.24 2005/04/03 18:42:27 vapier Exp $"; |
37 | static const char *rcsid = "$Id: scanelf.c,v 1.25 2005/04/03 18:56:08 vapier Exp $"; |
| 38 | |
38 | |
| 39 | |
39 | |
| 40 | /* helper functions for showing errors */ |
40 | /* helper functions for showing errors */ |
| 41 | #define argv0 "scanelf" /*((*argv != NULL) ? argv[0] : __FILE__ "\b\b")*/ |
41 | #define argv0 "scanelf" /*((*argv != NULL) ? argv[0] : __FILE__ "\b\b")*/ |
| 42 | #define warn(fmt, args...) \ |
42 | #define warn(fmt, args...) \ |
| … | |
… | |
| 410 | if (be_quiet && be_verbose) |
410 | if (be_quiet && be_verbose) |
| 411 | err("You can be quiet or you can be verbose, not both, stupid"); |
411 | err("You can be quiet or you can be verbose, not both, stupid"); |
| 412 | |
412 | |
| 413 | if (scan_ldpath) scanelf_ldpath(); |
413 | if (scan_ldpath) scanelf_ldpath(); |
| 414 | if (scan_envpath) scanelf_envpath(); |
414 | if (scan_envpath) scanelf_envpath(); |
|
|
415 | if (optind == argc && !scan_ldpath && !scan_envpath) |
|
|
416 | err("Nothing to scan !?"); |
| 415 | while (optind < argc) |
417 | while (optind < argc) |
| 416 | scanelf_dir(argv[optind++]); |
418 | scanelf_dir(argv[optind++]); |
| 417 | } |
419 | } |
| 418 | |
420 | |
| 419 | |
421 | |