diff options
author | jbj <devnull@localhost> | 2002-06-17 16:38:22 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2002-06-17 16:38:22 +0000 |
commit | cd8a7dcf4e0b6a45fcb06ce1555504f3bcd4f6ee (patch) | |
tree | f12836a0d1f8a1b8e006c2824816d92c1fdd88d9 /libelf/getarhdr.c | |
parent | dd5ee218a552c5ffe33325ba6eddf3ebc681475f (diff) | |
download | librpm-tizen-cd8a7dcf4e0b6a45fcb06ce1555504f3bcd4f6ee.tar.gz librpm-tizen-cd8a7dcf4e0b6a45fcb06ce1555504f3bcd4f6ee.tar.bz2 librpm-tizen-cd8a7dcf4e0b6a45fcb06ce1555504f3bcd4f6ee.zip |
Initial revision
CVS patchset: 5498
CVS date: 2002/06/17 16:38:22
Diffstat (limited to 'libelf/getarhdr.c')
-rwxr-xr-x | libelf/getarhdr.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/libelf/getarhdr.c b/libelf/getarhdr.c new file mode 100755 index 000000000..abf5fa890 --- /dev/null +++ b/libelf/getarhdr.c @@ -0,0 +1,33 @@ +/* +getarhdr.c - implementation of the elf_getarhdr(3) function. +Copyright (C) 1995 Michael Riepe <riepe@ifwsn4.ifw.uni-hannover.de> + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public +License as published by the Free Software Foundation; either +version 2 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +#include <private.h> + +Elf_Arhdr* +elf_getarhdr(Elf *elf) { + if (!elf) { + return NULL; + } + elf_assert(elf->e_magic == ELF_MAGIC); + if (elf->e_arhdr) { + return elf->e_arhdr; + } + seterr(ERROR_NOTARCHIVE); + return NULL; +} |