/[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.236 Revision 1.237
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.236 2011/12/21 17:34:12 vapier Exp $ 4 * $Header: /var/cvsroot/gentoo-projects/pax-utils/scanelf.c,v 1.237 2011/12/21 22:00:58 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.236 2011/12/21 17:34:12 vapier Exp $"; 10static const char rcsid[] = "$Id: scanelf.c,v 1.237 2011/12/21 22:00:58 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 == '+')
1674 else 1674 else
1675 dir = fdopendir(subdir_fd); 1675 dir = fdopendir(subdir_fd);
1676 if (dir == NULL) { 1676 if (dir == NULL) {
1677 if (subdir_fd != -1) 1677 if (subdir_fd != -1)
1678 close(subdir_fd); 1678 close(subdir_fd);
1679 warnf("could not opendir %s: %s", path, strerror(errno)); 1679 warnfp("could not opendir(%s)", path);
1680 return 1; 1680 return 1;
1681 } 1681 }
1682 if (be_verbose > 1) printf("%s: scanning dir\n", path); 1682 if (be_verbose > 1) printf("%s: scanning dir\n", path);
1683 1683
1684 subpath = stpcpy(buf, path); 1684 subpath = stpcpy(buf, path);
2069 if (sscanf(optarg, "%o", &match_perms) == -1) 2069 if (sscanf(optarg, "%o", &match_perms) == -1)
2070 match_bits = 0; 2070 match_bits = 0;
2071 break; 2071 break;
2072 case 'o': { 2072 case 'o': {
2073 if (freopen(optarg, "w", stdout) == NULL) 2073 if (freopen(optarg, "w", stdout) == NULL)
2074 err("Could not open output stream '%s': %s", optarg, strerror(errno)); 2074 errp("Could not freopen(%s)", optarg);
2075 break; 2075 break;
2076 } 2076 }
2077 case 'k': 2077 case 'k':
2078 xarraypush_str(find_section_arr, optarg); 2078 xarraypush_str(find_section_arr, optarg);
2079 break; 2079 break;

Legend:
Removed from v.1.236  
changed lines
  Added in v.1.237

  ViewVC Help
Powered by ViewVC 1.1.20