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

Diff of /pax-utils/scanmacho.c

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

Revision 1.5 Revision 1.6
1/* 1/*
2 * Copyright 2008 Gentoo Foundation 2 * Copyright 2008 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/scanmacho.c,v 1.5 2008/10/19 18:11:59 grobian Exp $ 4 * $Header: /var/cvsroot/gentoo-projects/pax-utils/scanmacho.c,v 1.6 2008/12/30 12:00:06 vapier Exp $
5 * 5 *
6 * based on scanelf by: 6 * based on scanelf by:
7 * Copyright 2003-2007 Ned Ludd - <solar@gentoo.org> 7 * Copyright 2003-2007 Ned Ludd - <solar@gentoo.org>
8 * Copyright 2004-2007 Mike Frysinger - <vapier@gentoo.org> 8 * Copyright 2004-2007 Mike Frysinger - <vapier@gentoo.org>
9 * for Darwin specific fun: 9 * for Darwin specific fun:
10 * 2008 Fabian Groffen - <grobian@gentoo.org> 10 * 2008 Fabian Groffen - <grobian@gentoo.org>
11 */ 11 */
12 12
13static const char *rcsid = "$Id: scanmacho.c,v 1.5 2008/10/19 18:11:59 grobian Exp $"; 13static const char *rcsid = "$Id: scanmacho.c,v 1.6 2008/12/30 12:00:06 vapier Exp $";
14const char * const argv0 = "scanmacho"; 14const char * const argv0 = "scanmacho";
15 15
16#include "paxinc.h" 16#include "paxinc.h"
17 17
18#define IS_MODIFIER(c) (c == '%' || c == '#' || c == '+') 18#define IS_MODIFIER(c) (c == '%' || c == '#' || c == '+')
394 394
395 ar = ar_open_fd(filename, fd); 395 ar = ar_open_fd(filename, fd);
396 if (ar == NULL) 396 if (ar == NULL)
397 return 1; 397 return 1;
398 398
399 ar_buffer = (char*)mmap(0, len, PROT_READ, MAP_PRIVATE, fd, 0); 399 ar_buffer = mmap(0, len, PROT_READ, MAP_PRIVATE, fd, 0);
400 while ((m = ar_next(ar)) != NULL) { 400 while ((m = ar_next(ar)) != NULL) {
401 fobj = readmacho_buffer(m->name, ar_buffer + lseek(fd, 0, SEEK_CUR), m->size); 401 fobj = readmacho_buffer(m->name, ar_buffer + lseek(fd, 0, SEEK_CUR), m->size);
402 if (fobj) { 402 if (fobj) {
403 walk = fobj; 403 walk = fobj;
404 do { 404 do {

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.20