/[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.115 Revision 1.116
1/* 1/*
2 * Copyright 2003-2006 Gentoo Foundation 2 * Copyright 2003-2006 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.115 2006/01/24 00:34:00 vapier Exp $ 4 * $Header: /var/cvsroot/gentoo-projects/pax-utils/scanelf.c,v 1.116 2006/01/28 18:54:08 solar Exp $
5 * 5 *
6 * Copyright 2003-2006 Ned Ludd - <solar@gentoo.org> 6 * Copyright 2003-2006 Ned Ludd - <solar@gentoo.org>
7 * Copyright 2004-2006 Mike Frysinger - <vapier@gentoo.org> 7 * Copyright 2004-2006 Mike Frysinger - <vapier@gentoo.org>
8 */ 8 */
9 9
10#include "paxinc.h" 10#include "paxinc.h"
11 11
12static const char *rcsid = "$Id: scanelf.c,v 1.115 2006/01/24 00:34:00 vapier Exp $"; 12static const char *rcsid = "$Id: scanelf.c,v 1.116 2006/01/28 18:54:08 solar Exp $";
13#define argv0 "scanelf" 13#define argv0 "scanelf"
14 14
15#define IS_MODIFIER(c) (c == '%' || c == '#') 15#define IS_MODIFIER(c) (c == '%' || c == '#')
16 16
17 17
597 ldcache_size = st.st_size; 597 ldcache_size = st.st_size;
598 ldcache = mmap(0, ldcache_size, PROT_READ, MAP_SHARED, fd, 0); 598 ldcache = mmap(0, ldcache_size, PROT_READ, MAP_SHARED, fd, 0);
599 599
600 close(fd); 600 close(fd);
601 601
602 if (ldcache == (caddr_t)-1) 602 if (ldcache == (caddr_t)-1) {
603 ldcache = 0;
603 return NULL; 604 return NULL;
605 }
604 606
605 if (memcmp(((header_t *) ldcache)->magic, LDSO_CACHE_MAGIC, LDSO_CACHE_MAGIC_LEN)) 607 if (memcmp(((header_t *) ldcache)->magic, LDSO_CACHE_MAGIC, LDSO_CACHE_MAGIC_LEN))
606 return NULL; 608 return NULL;
607 if (memcmp (((header_t *) ldcache)->version, LDSO_CACHE_VER, LDSO_CACHE_VER_LEN)) 609 if (memcmp (((header_t *) ldcache)->version, LDSO_CACHE_VER, LDSO_CACHE_VER_LEN))
608 return NULL; 610 return NULL;

Legend:
Removed from v.1.115  
changed lines
  Added in v.1.116

  ViewVC Help
Powered by ViewVC 1.1.20