2 * simple program to insert an md5sum into application data area of iso99660
3 * Copyright (C) 2001-2007 Red Hat, Inc.
4 * Michael Fulbright <msf@redhat.com>
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 #include "libimplantisomd5.h"
29 static void usage(void) {
30 fprintf(stderr, "implantisomd5: implantisomd5 [--force] [--supported-iso] <isofilename>\n");
35 int main(int argc, char **argv) {
45 struct poptOption options[] = {
46 { "force", 'f', POPT_ARG_NONE, &forceit, 0 },
47 { "supported-iso", 'S', POPT_ARG_NONE, &supported, 0 },
48 { "help", 'h', POPT_ARG_NONE, &help, 0},
53 optCon = poptGetContext("implantisomd5", argc, (const char **)argv, options, 0);
55 if ((rc = poptGetNextOpt(optCon)) < -1) {
56 fprintf(stderr, "bad option %s: %s\n",
57 poptBadOption(optCon, POPT_BADOPTION_NOALIAS),
65 args = poptGetArgs(optCon);
66 if (!args || !args[0] || !args[0][0])
69 rc = implantISOFile((char *)args[0], supported, forceit, 0, &errstr);
71 fprintf(stderr, "ERROR: ");
72 fprintf(stderr, errstr, (char *)args[0]);