diff --git a/libisofs/trunk/test/iso.c b/libisofs/trunk/test/iso.c index dc9cea98..54361e89 100644 --- a/libisofs/trunk/test/iso.c +++ b/libisofs/trunk/test/iso.c @@ -24,9 +24,10 @@ const char * const optstring = "JRL:b:hV:"; extern char *optarg; 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() @@ -61,7 +62,7 @@ int main(int argc, char **argv) while ((c = getopt(argc, argv, optstring)) != -1) { switch(c) { case 'h': - usage(); + usage(argv); help(); exit(0); break; @@ -81,7 +82,7 @@ int main(int argc, char **argv) volid = optarg; break; case '?': - usage(); + usage(argv); exit(1); break; } @@ -89,12 +90,12 @@ int main(int argc, char **argv) if (argc < 2) { printf ("Please pass directory from which to build ISO\n"); - usage(); + usage(argv); return 1; } if (argc < 3) { printf ("Please supply output file\n"); - usage(); + usage(argv); return 1; }