/[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.201 Revision 1.202
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.201 2008/12/30 12:00:06 vapier Exp $ 4 * $Header: /var/cvsroot/gentoo-projects/pax-utils/scanelf.c,v 1.202 2008/12/30 12:38:04 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.201 2008/12/30 12:00:06 vapier Exp $"; 10static const char *rcsid = "$Id: scanelf.c,v 1.202 2008/12/30 12:38:04 vapier Exp $";
11const char * const argv0 = "scanelf"; 11const char * const 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 == '+')
738 ldcache_size = st.st_size; 738 ldcache_size = st.st_size;
739 ldcache = mmap(0, ldcache_size, PROT_READ, MAP_SHARED, fd, 0); 739 ldcache = mmap(0, ldcache_size, PROT_READ, MAP_SHARED, fd, 0);
740 740
741 close(fd); 741 close(fd);
742 742
743 if (ldcache == (caddr_t)-1) { 743 if (ldcache == MAP_FAILED) {
744 ldcache = 0; 744 ldcache = 0;
745 return NULL; 745 return NULL;
746 } 746 }
747 747
748 if (memcmp(((header_t *) ldcache)->magic, LDSO_CACHE_MAGIC, LDSO_CACHE_MAGIC_LEN)) 748 if (memcmp(((header_t *) ldcache)->magic, LDSO_CACHE_MAGIC, LDSO_CACHE_MAGIC_LEN))

Legend:
Removed from v.1.201  
changed lines
  Added in v.1.202

  ViewVC Help
Powered by ViewVC 1.1.20