diff options
Diffstat (limited to 'isomd5sum/implantisomd5.c')
-rw-r--r-- | isomd5sum/implantisomd5.c | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/isomd5sum/implantisomd5.c b/isomd5sum/implantisomd5.c deleted file mode 100644 index d21383a7f..000000000 --- a/isomd5sum/implantisomd5.c +++ /dev/null @@ -1,62 +0,0 @@ -/* simple program to insert a md5sum into application data area of */ -/* an iso9660 image */ -/* Copyright 2001 Red Hat, Inc. */ -/* Michael Fulbright msf@redhat.com */ - -#include <stdio.h> -#include <stdlib.h> -#include <popt.h> - -#include "md5.h" -#include "libimplantisomd5.h" - - -static void usage(void) { - fprintf(stderr, "implantisomd5: implantisomd5 [--force] [--supported-iso] <isofilename>\n"); - exit(1); -} - - -int main(int argc, char **argv) { - int rc; - char *errstr; - const char **args; - - int forceit=0; - int supported=0; - int help=0; - - poptContext optCon; - struct poptOption options[] = { - { "force", 'f', POPT_ARG_NONE, &forceit, 0 }, - { "supported-iso", 'S', POPT_ARG_NONE, &supported, 0 }, - { "help", 'h', POPT_ARG_NONE, &help, 0}, - { 0, 0, 0, 0, 0} - }; - - - optCon = poptGetContext("implantisomd5", argc, (const char **)argv, options, 0); - - if ((rc = poptGetNextOpt(optCon)) < -1) { - fprintf(stderr, "bad option %s: %s\n", - poptBadOption(optCon, POPT_BADOPTION_NOALIAS), - poptStrerror(rc)); - exit(1); - } - - if (help) - usage(); - - args = poptGetArgs(optCon); - if (!args || !args[0] || !args[0][0]) - usage(); - - rc = implantISOFile((char *)args[0], supported, forceit, 0, &errstr); - if (rc) { - fprintf(stderr, "ERROR: "); - fprintf(stderr, errstr, (char *)args[0]); - exit(1); - } else { - exit(0); - } -} |