Made minor changes to libisofs iso.c

This commit is contained in:
Mario Danic 2007-09-14 04:03:42 +00:00
parent e11910fdef
commit fe7ad51d3d

View File

@ -24,9 +24,10 @@ const char * const optstring = "JRL:b:hV:";
extern char *optarg; extern char *optarg;
extern int optind; extern int optind;
void usage() void usage(char **argv)
{ {
printf("test [OPTIONS] DIRECTORY OUTPUT\n"); printf("%s [OPTIONS] DIRECTORY OUTPUT\n", argv[0]);
help();
} }
void help() void help()
@ -61,7 +62,7 @@ int main(int argc, char **argv)
while ((c = getopt(argc, argv, optstring)) != -1) { while ((c = getopt(argc, argv, optstring)) != -1) {
switch(c) { switch(c) {
case 'h': case 'h':
usage(); usage(argv);
help(); help();
exit(0); exit(0);
break; break;
@ -81,7 +82,7 @@ int main(int argc, char **argv)
volid = optarg; volid = optarg;
break; break;
case '?': case '?':
usage(); usage(argv);
exit(1); exit(1);
break; break;
} }
@ -89,12 +90,12 @@ int main(int argc, char **argv)
if (argc < 2) { if (argc < 2) {
printf ("Please pass directory from which to build ISO\n"); printf ("Please pass directory from which to build ISO\n");
usage(); usage(argv);
return 1; return 1;
} }
if (argc < 3) { if (argc < 3) {
printf ("Please supply output file\n"); printf ("Please supply output file\n");
usage(); usage(argv);
return 1; return 1;
} }