/[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.73 Revision 1.74
1/* 1/*
2 * Copyright 2003-2005 Gentoo Foundation 2 * Copyright 2003-2005 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.73 2005/06/04 13:52:54 solar Exp $ 4 * $Header: /var/cvsroot/gentoo-projects/pax-utils/scanelf.c,v 1.74 2005/06/05 09:42:06 vapier Exp $
5 * 5 *
6 ******************************************************************** 6 ********************************************************************
7 * This program is free software; you can redistribute it and/or 7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as 8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2 of the 9 * published by the Free Software Foundation; either version 2 of the
33#include <dirent.h> 33#include <dirent.h>
34#include <getopt.h> 34#include <getopt.h>
35#include <assert.h> 35#include <assert.h>
36#include "paxelf.h" 36#include "paxelf.h"
37 37
38static const char *rcsid = "$Id: scanelf.c,v 1.73 2005/06/04 13:52:54 solar Exp $"; 38static const char *rcsid = "$Id: scanelf.c,v 1.74 2005/06/05 09:42:06 vapier Exp $";
39#define argv0 "scanelf" 39#define argv0 "scanelf"
40 40
41#define IS_MODIFIER(c) (c == '%' || c == '#') 41#define IS_MODIFIER(c) (c == '%' || c == '#')
42 42
43 43
667 while ((dentry = readdir(dir))) { 667 while ((dentry = readdir(dir))) {
668 if (!strcmp(dentry->d_name, ".") || !strcmp(dentry->d_name, "..")) 668 if (!strcmp(dentry->d_name, ".") || !strcmp(dentry->d_name, ".."))
669 continue; 669 continue;
670 len = (pathlen + 1 + strlen(dentry->d_name) + 1); 670 len = (pathlen + 1 + strlen(dentry->d_name) + 1);
671 if (len >= sizeof(buf)) { 671 if (len >= sizeof(buf)) {
672 warnf("Skipping '%s': len > sizeof(buf); %u > %u\n", path, len, sizeof(buf)); 672 warnf("Skipping '%s': len > sizeof(buf); %lu > %lu\n", path, len, sizeof(buf));
673 continue; 673 continue;
674 } 674 }
675 sprintf(buf, "%s/%s", path, dentry->d_name); 675 sprintf(buf, "%s/%s", path, dentry->d_name);
676 if (lstat(buf, &st) != -1) { 676 if (lstat(buf, &st) != -1) {
677 if (S_ISREG(st.st_mode)) 677 if (S_ISREG(st.st_mode))

Legend:
Removed from v.1.73  
changed lines
  Added in v.1.74

  ViewVC Help
Powered by ViewVC 1.1.20