]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
More explanation of bad arguments.
authorTim Kientzle <kientzle@gmail.com>
Sun, 13 Dec 2009 19:27:41 +0000 (14:27 -0500)
committerTim Kientzle <kientzle@gmail.com>
Sun, 13 Dec 2009 19:27:41 +0000 (14:27 -0500)
SVN-Revision: 1731

tar/test/main.c

index 77416da448ac2c7b9f66bed9068ff0ce31004d6c..33355855c6017506ed61d9e8353ff85f41aebc51 100644 (file)
@@ -1909,6 +1909,7 @@ main(int argc, char **argv)
 #ifdef PROGRAM
                                testprogfile = option_arg;
 #else
+                               fprintf(stderr, "-p option not permitted\n");
                                usage(progname);
 #endif
                                break;
@@ -1922,6 +1923,8 @@ main(int argc, char **argv)
                                verbosity++;
                                break;
                        default:
+                               fprintf(stderr, "Unrecognized option '%c'\n",
+                                   option);
                                usage(progname);
                        }
                }
@@ -1931,8 +1934,11 @@ main(int argc, char **argv)
         * Sanity-check that our options make sense.
         */
 #ifdef PROGRAM
-       if (testprogfile == NULL)
+       if (testprogfile == NULL) {
+               fprintf(stderr, "Program executable required\n");
                usage(progname);
+       }
+
        {
                char *testprg;
 #if defined(_WIN32) && !defined(__CYGWIN__)