/[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.240 Revision 1.241
1/* 1/*
2 * Copyright 2003-2007 Gentoo Foundation 2 * Copyright 2003-2007 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.240 2012/01/23 23:48:54 vapier Exp $ 4 * $Header: /var/cvsroot/gentoo-projects/pax-utils/scanelf.c,v 1.241 2012/01/25 01:58:29 vapier Exp $
5 * 5 *
6 * Copyright 2003-2007 Ned Ludd - <solar@gentoo.org> 6 * Copyright 2003-2007 Ned Ludd - <solar@gentoo.org>
7 * Copyright 2004-2007 Mike Frysinger - <vapier@gentoo.org> 7 * Copyright 2004-2007 Mike Frysinger - <vapier@gentoo.org>
8 */ 8 */
9 9
10static const char rcsid[] = "$Id: scanelf.c,v 1.240 2012/01/23 23:48:54 vapier Exp $"; 10static const char rcsid[] = "$Id: scanelf.c,v 1.241 2012/01/25 01:58:29 vapier Exp $";
11const char argv0[] = "scanelf"; 11const char argv0[] = "scanelf";
12 12
13#include "paxinc.h" 13#include "paxinc.h"
14 14
15#define IS_MODIFIER(c) (c == '%' || c == '#' || c == '+') 15#define IS_MODIFIER(c) (c == '%' || c == '#' || c == '+')
2035{ 2035{
2036 unsigned long i; 2036 unsigned long i;
2037 printf("* Scan ELF binaries for stuff\n\n" 2037 printf("* Scan ELF binaries for stuff\n\n"
2038 "Usage: %s [options] <dir1/file1> [dir2 dirN file2 fileN ...]\n\n", argv0); 2038 "Usage: %s [options] <dir1/file1> [dir2 dirN file2 fileN ...]\n\n", argv0);
2039 printf("Options: -[%s]\n", PARSE_FLAGS); 2039 printf("Options: -[%s]\n", PARSE_FLAGS);
2040 for (i = 0; long_opts[i].name; ++i) 2040 for (i = 0; long_opts[i].name; ++i) {
2041 /* first output the short flag if it has one */
2042 if (long_opts[i].val > '~')
2043 printf(" ");
2044 else
2045 printf(" -%c, ", long_opts[i].val);
2046
2047 /* then the long flag */
2041 if (long_opts[i].has_arg == no_argument) 2048 if (long_opts[i].has_arg == no_argument)
2042 printf(" -%c, --%-14s* %s\n", long_opts[i].val, 2049 printf("--%-14s", long_opts[i].name);
2043 long_opts[i].name, opts_help[i]);
2044 else if (long_opts[i].val > '~')
2045 printf(" --%-7s <arg> * %s\n",
2046 long_opts[i].name, opts_help[i]);
2047 else 2050 else
2048 printf(" -%c, --%-7s <arg> * %s\n", long_opts[i].val, 2051 printf("--%-7s <arg> ", long_opts[i].name);
2049 long_opts[i].name, opts_help[i]); 2052
2053 /* finally the help text */
2054 printf("* %s\n", opts_help[i]);
2055 }
2050 2056
2051 puts("\nFor more information, see the scanelf(1) manpage"); 2057 puts("\nFor more information, see the scanelf(1) manpage");
2052 exit(status); 2058 exit(status);
2053} 2059}
2054 2060

Legend:
Removed from v.1.240  
changed lines
  Added in v.1.241

  ViewVC Help
Powered by ViewVC 1.1.20