diff options
Diffstat (limited to 'tools/dump.c')
-rw-r--r-- | tools/dump.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/tools/dump.c b/tools/dump.c deleted file mode 100644 index 58777558b..000000000 --- a/tools/dump.c +++ /dev/null @@ -1,36 +0,0 @@ -#include "system.h" -const char *__progname; - -#include "lib/header_internal.h" -#include "debug.h" - -int main(int argc, char *argv[]) -{ - Header h; - FD_t fdi; - - setprogname(argv[0]); /* Retrofit glibc __progname */ - if (argc == 1) { - fdi = Fopen("-", "r.ufdio"); - } else { - fdi = Fopen(argv[1], "r.ufdio"); - } - - if (Ferror(fdi)) { - fprintf(stderr, "cannot open %s: %s\n", - (argc == 1 ? "<stdin>" : argv[1]), Fstrerror(fdi)); - exit(EXIT_FAILURE); - } - - h = headerRead(fdi, HEADER_MAGIC_YES); - if (!h) { - fprintf(stderr, "headerRead error: %s\n", Fstrerror(fdi)); - exit(EXIT_FAILURE); - } - Fclose(fdi); - - headerDump(h, stdout, HEADER_DUMP_INLINE, rpmTagTable); - h = headerFree(h); - - return 0; -} |