/[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.244 Revision 1.245
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/Attic/scanelf.c,v 1.244 2012/04/29 06:21:36 vapier Exp $ 4 * $Header: /var/cvsroot/gentoo-projects/pax-utils/Attic/scanelf.c,v 1.245 2012/08/04 06:08:25 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.244 2012/04/29 06:21:36 vapier Exp $"; 10static const char rcsid[] = "$Id: scanelf.c,v 1.245 2012/08/04 06:08:25 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 == '+')
1659 if (match_perms) { 1659 if (match_perms) {
1660 if ((st->st_mode | match_perms) != st->st_mode) 1660 if ((st->st_mode | match_perms) != st->st_mode)
1661 return 1; 1661 return 1;
1662 } 1662 }
1663 fd = openat(dir_fd, filename, (fix_elf ? O_RDWR : O_RDONLY) | O_CLOEXEC); 1663 fd = openat(dir_fd, filename, (fix_elf ? O_RDWR : O_RDONLY) | O_CLOEXEC);
1664 if (fd == -1) 1664 if (fd == -1) {
1665 if (fix_elf && errno == ETXTBSY)
1666 warnp("%s: could not fix", filename);
1667 else if (be_verbose > 2)
1668 printf("%s: skipping file: %s\n", filename, strerror(errno));
1665 return 1; 1669 return 1;
1670 }
1666 1671
1667 if (scanelf_elf(filename, fd, st->st_size) == 2) { 1672 if (scanelf_elf(filename, fd, st->st_size) == 2) {
1668 /* if it isn't an ELF, maybe it's an .a archive */ 1673 /* if it isn't an ELF, maybe it's an .a archive */
1669 if (scan_archives) 1674 if (scan_archives)
1670 scanelf_archive(filename, fd, st->st_size); 1675 scanelf_archive(filename, fd, st->st_size);

Legend:
Removed from v.1.244  
changed lines
  Added in v.1.245

  ViewVC Help
Powered by ViewVC 1.1.20