/[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.223 Revision 1.224
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.223 2011/07/30 17:08:30 solar Exp $ 4 * $Header: /var/cvsroot/gentoo-projects/pax-utils/scanelf.c,v 1.224 2011/08/08 01:56:16 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.223 2011/07/30 17:08:30 solar Exp $"; 10static const char *rcsid = "$Id: scanelf.c,v 1.224 2011/08/08 01:56:16 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 == '+')
1496 1496
1497 close(fd); 1497 close(fd);
1498 return 0; 1498 return 0;
1499} 1499}
1500 1500
1501static const char* maybe_add_root(const char* fname, char* buf) 1501static const char *maybe_add_root(const char *fname, char *buf)
1502{ 1502{
1503 if (root && strncmp(fname, root, strlen(root))) { 1503 if (root && strncmp(fname, root, strlen(root))) {
1504 strcpy(buf, root); 1504 strcpy(buf, root);
1505 strncat(buf, fname, __PAX_UTILS_PATH_MAX-strlen(root)-1); 1505 strncat(buf, fname, __PAX_UTILS_PATH_MAX - strlen(root) - 1);
1506 fname = buf; 1506 fname = buf;
1507 } 1507 }
1508 return fname; 1508 return fname;
1509} 1509}
1510 1510

Legend:
Removed from v.1.223  
changed lines
  Added in v.1.224

  ViewVC Help
Powered by ViewVC 1.1.20