diff options
author | Erik Andersen <andersen@codepoet.org> | 2000-04-19 07:38:01 +0400 |
---|---|---|
committer | Erik Andersen <andersen@codepoet.org> | 2000-04-19 07:38:01 +0400 |
commit | a3e57ca7008cbaf612675b9de3dd18109f8150de (patch) | |
tree | d785d0e01aed700b2af875e6e11e768a1cb030b5 /tar.c | |
parent | f13df3752cd5077622201e6b69c71cd7cd5095a4 (diff) |
make ps accept (and ignore) all options (--help works of course).
tar now works with or without the leading "-" on the options.
-Erik
Diffstat (limited to 'tar.c')
-rw-r--r-- | tar.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -70,13 +70,13 @@ static const char tar_usage[] = #endif "\tx\t\textract\n" "\tt\t\tlist\n" - "File selection:\n" + "\nFile selection:\n" "\tf\t\tname of tarfile or \"-\" for stdin\n" "\tO\t\textract to stdout\n" #if defined BB_FEATURE_TAR_EXCLUDE "\t--exclude\tfile to exclude\n" #endif - "Informative output:\n" + "\nInformative output:\n" "\tv\t\tverbosely list files processed\n" ; @@ -184,7 +184,7 @@ extern int tar_main(int argc, char **argv) usage(tar_usage); /* Parse any options */ - while (--argc > 0 && **(++argv) == '-') { + while (--argc > 0 && (**(++argv) != '\0')) { stopIt=FALSE; while (stopIt==FALSE && *(++(*argv))) { switch (**argv) { @@ -245,7 +245,6 @@ extern int tar_main(int argc, char **argv) break; } #endif - usage(tar_usage); break; default: |