1 | /* |
1 | /* |
2 | * Copyright 2003 Ned Ludd <solar@gentoo.org> |
2 | * Copyright 2003 Ned Ludd <solar@gentoo.org> |
3 | * Copyright 1999-2005 Gentoo Foundation |
3 | * Copyright 1999-2005 Gentoo Foundation |
4 | * Distributed under the terms of the GNU General Public License v2 |
4 | * Distributed under the terms of the GNU General Public License v2 |
5 | * $Header: /var/cvsroot/gentoo-projects/pax-utils/Attic/scanelf.c,v 1.46 2005/05/16 21:59:06 vapier Exp $ |
5 | * $Header: /var/cvsroot/gentoo-projects/pax-utils/Attic/scanelf.c,v 1.47 2005/05/18 01:08:46 vapier Exp $ |
6 | * |
6 | * |
7 | ******************************************************************** |
7 | ******************************************************************** |
8 | * This program is free software; you can redistribute it and/or |
8 | * This program is free software; you can redistribute it and/or |
9 | * modify it under the terms of the GNU General Public License as |
9 | * modify it under the terms of the GNU General Public License as |
10 | * published by the Free Software Foundation; either version 2 of the |
10 | * published by the Free Software Foundation; either version 2 of the |
… | |
… | |
33 | #include <getopt.h> |
33 | #include <getopt.h> |
34 | #include <assert.h> |
34 | #include <assert.h> |
35 | |
35 | |
36 | #include "paxelf.h" |
36 | #include "paxelf.h" |
37 | |
37 | |
38 | static const char *rcsid = "$Id: scanelf.c,v 1.46 2005/05/16 21:59:06 vapier Exp $"; |
38 | static const char *rcsid = "$Id: scanelf.c,v 1.47 2005/05/18 01:08:46 vapier Exp $"; |
39 | #define argv0 "scanelf" |
39 | #define argv0 "scanelf" |
40 | |
40 | |
41 | |
41 | |
42 | |
42 | |
43 | /* prototypes */ |
43 | /* prototypes */ |
… | |
… | |
490 | } |
490 | } |
491 | } |
491 | } |
492 | closedir(dir); |
492 | closedir(dir); |
493 | } |
493 | } |
494 | |
494 | |
495 | int scanelf_from_file(char *filename) { |
495 | static int scanelf_from_file(char *filename) |
|
|
496 | { |
496 | FILE *fp = NULL; |
497 | FILE *fp = NULL; |
497 | char *p; |
498 | char *p; |
498 | char path[_POSIX_PATH_MAX]; |
499 | char path[_POSIX_PATH_MAX]; |
499 | |
500 | |
500 | if (((strcmp(filename, "-")) == 0) && (ttyname(0) == NULL)) |
501 | if (((strcmp(filename, "-")) == 0) && (ttyname(0) == NULL)) |