diff options
author | Erik Andersen <andersen@codepoet.org> | 2000-04-19 03:38:01 +0000 |
---|---|---|
committer | Erik Andersen <andersen@codepoet.org> | 2000-04-19 03:38:01 +0000 |
commit | a3e57ca7008cbaf612675b9de3dd18109f8150de (patch) | |
tree | d785d0e01aed700b2af875e6e11e768a1cb030b5 | |
parent | f13df3752cd5077622201e6b69c71cd7cd5095a4 (diff) | |
download | busybox-w32-a3e57ca7008cbaf612675b9de3dd18109f8150de.tar.gz busybox-w32-a3e57ca7008cbaf612675b9de3dd18109f8150de.tar.bz2 busybox-w32-a3e57ca7008cbaf612675b9de3dd18109f8150de.zip |
make ps accept (and ignore) all options (--help works of course).
tar now works with or without the leading "-" on the options.
-Erik
-rw-r--r-- | Changelog | 2 | ||||
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | archival/tar.c | 7 | ||||
-rw-r--r-- | procps/ps.c | 3 | ||||
-rw-r--r-- | ps.c | 3 | ||||
-rw-r--r-- | tar.c | 7 |
6 files changed, 14 insertions, 12 deletions
@@ -55,6 +55,8 @@ | |||
55 | * Fixed a bug where "sed 's/foo/bar/g'" (i.e. a script w/o a "-e") | 55 | * Fixed a bug where "sed 's/foo/bar/g'" (i.e. a script w/o a "-e") |
56 | * ps now supports BB_FEATURE_AUTOWIDTH, and can adjust its width | 56 | * ps now supports BB_FEATURE_AUTOWIDTH, and can adjust its width |
57 | to match the terminal (defaults to width=79 when this is off). | 57 | to match the terminal (defaults to width=79 when this is off). |
58 | * ps now accepts (and ignores) all options except for "--help" (which | ||
59 | as would be expected displays help). | ||
58 | * Fixed mount'ing loop devices when the filesystem type was not | 60 | * Fixed mount'ing loop devices when the filesystem type was not |
59 | specified. It used to revert to non-loop after the first try. | 61 | specified. It used to revert to non-loop after the first try. |
60 | * all mallocs now use xmalloc (and so are OOM error safe), and | 62 | * all mallocs now use xmalloc (and so are OOM error safe), and |
@@ -26,7 +26,7 @@ export VERSION | |||
26 | # Set the following to `true' to make a debuggable build. | 26 | # Set the following to `true' to make a debuggable build. |
27 | # Leave this set to `false' for production use. | 27 | # Leave this set to `false' for production use. |
28 | # eg: `make DODEBUG=true tests' | 28 | # eg: `make DODEBUG=true tests' |
29 | DODEBUG = false | 29 | DODEBUG = true |
30 | 30 | ||
31 | # If you want a static binary, turn this on. | 31 | # If you want a static binary, turn this on. |
32 | DOSTATIC = false | 32 | DOSTATIC = false |
@@ -108,7 +108,7 @@ docs: | |||
108 | $(MAKE) -C docs | 108 | $(MAKE) -C docs |
109 | 109 | ||
110 | regexp.o nfsmount.o: %.o: %.h | 110 | regexp.o nfsmount.o: %.o: %.h |
111 | $(OBJECTS): %.o: busybox.def.h internal.h %.c | 111 | $(OBJECTS): %.o: busybox.def.h internal.h %.c Makefile |
112 | 112 | ||
113 | test tests: | 113 | test tests: |
114 | cd tests && $(MAKE) all | 114 | cd tests && $(MAKE) all |
diff --git a/archival/tar.c b/archival/tar.c index 9b3cb7d81..2284fd06d 100644 --- a/archival/tar.c +++ b/archival/tar.c | |||
@@ -70,13 +70,13 @@ static const char tar_usage[] = | |||
70 | #endif | 70 | #endif |
71 | "\tx\t\textract\n" | 71 | "\tx\t\textract\n" |
72 | "\tt\t\tlist\n" | 72 | "\tt\t\tlist\n" |
73 | "File selection:\n" | 73 | "\nFile selection:\n" |
74 | "\tf\t\tname of tarfile or \"-\" for stdin\n" | 74 | "\tf\t\tname of tarfile or \"-\" for stdin\n" |
75 | "\tO\t\textract to stdout\n" | 75 | "\tO\t\textract to stdout\n" |
76 | #if defined BB_FEATURE_TAR_EXCLUDE | 76 | #if defined BB_FEATURE_TAR_EXCLUDE |
77 | "\t--exclude\tfile to exclude\n" | 77 | "\t--exclude\tfile to exclude\n" |
78 | #endif | 78 | #endif |
79 | "Informative output:\n" | 79 | "\nInformative output:\n" |
80 | "\tv\t\tverbosely list files processed\n" | 80 | "\tv\t\tverbosely list files processed\n" |
81 | ; | 81 | ; |
82 | 82 | ||
@@ -184,7 +184,7 @@ extern int tar_main(int argc, char **argv) | |||
184 | usage(tar_usage); | 184 | usage(tar_usage); |
185 | 185 | ||
186 | /* Parse any options */ | 186 | /* Parse any options */ |
187 | while (--argc > 0 && **(++argv) == '-') { | 187 | while (--argc > 0 && (**(++argv) != '\0')) { |
188 | stopIt=FALSE; | 188 | stopIt=FALSE; |
189 | while (stopIt==FALSE && *(++(*argv))) { | 189 | while (stopIt==FALSE && *(++(*argv))) { |
190 | switch (**argv) { | 190 | switch (**argv) { |
@@ -245,7 +245,6 @@ extern int tar_main(int argc, char **argv) | |||
245 | break; | 245 | break; |
246 | } | 246 | } |
247 | #endif | 247 | #endif |
248 | usage(tar_usage); | ||
249 | break; | 248 | break; |
250 | 249 | ||
251 | default: | 250 | default: |
diff --git a/procps/ps.c b/procps/ps.c index 1b3f4fb6c..8d59700fd 100644 --- a/procps/ps.c +++ b/procps/ps.c | |||
@@ -128,8 +128,9 @@ extern int ps_main(int argc, char **argv) | |||
128 | 128 | ||
129 | 129 | ||
130 | 130 | ||
131 | if (argc > 1 && **(argv + 1) == '-') | 131 | if (argc > 1 && strcmp(argv[1], "--help") == 0) { |
132 | usage ("ps\n\nReport process status\n\nThis version of ps accepts no options.\n"); | 132 | usage ("ps\n\nReport process status\n\nThis version of ps accepts no options.\n"); |
133 | } | ||
133 | 134 | ||
134 | dir = opendir("/proc"); | 135 | dir = opendir("/proc"); |
135 | if (!dir) | 136 | if (!dir) |
@@ -128,8 +128,9 @@ extern int ps_main(int argc, char **argv) | |||
128 | 128 | ||
129 | 129 | ||
130 | 130 | ||
131 | if (argc > 1 && **(argv + 1) == '-') | 131 | if (argc > 1 && strcmp(argv[1], "--help") == 0) { |
132 | usage ("ps\n\nReport process status\n\nThis version of ps accepts no options.\n"); | 132 | usage ("ps\n\nReport process status\n\nThis version of ps accepts no options.\n"); |
133 | } | ||
133 | 134 | ||
134 | dir = opendir("/proc"); | 135 | dir = opendir("/proc"); |
135 | if (!dir) | 136 | if (!dir) |
@@ -70,13 +70,13 @@ static const char tar_usage[] = | |||
70 | #endif | 70 | #endif |
71 | "\tx\t\textract\n" | 71 | "\tx\t\textract\n" |
72 | "\tt\t\tlist\n" | 72 | "\tt\t\tlist\n" |
73 | "File selection:\n" | 73 | "\nFile selection:\n" |
74 | "\tf\t\tname of tarfile or \"-\" for stdin\n" | 74 | "\tf\t\tname of tarfile or \"-\" for stdin\n" |
75 | "\tO\t\textract to stdout\n" | 75 | "\tO\t\textract to stdout\n" |
76 | #if defined BB_FEATURE_TAR_EXCLUDE | 76 | #if defined BB_FEATURE_TAR_EXCLUDE |
77 | "\t--exclude\tfile to exclude\n" | 77 | "\t--exclude\tfile to exclude\n" |
78 | #endif | 78 | #endif |
79 | "Informative output:\n" | 79 | "\nInformative output:\n" |
80 | "\tv\t\tverbosely list files processed\n" | 80 | "\tv\t\tverbosely list files processed\n" |
81 | ; | 81 | ; |
82 | 82 | ||
@@ -184,7 +184,7 @@ extern int tar_main(int argc, char **argv) | |||
184 | usage(tar_usage); | 184 | usage(tar_usage); |
185 | 185 | ||
186 | /* Parse any options */ | 186 | /* Parse any options */ |
187 | while (--argc > 0 && **(++argv) == '-') { | 187 | while (--argc > 0 && (**(++argv) != '\0')) { |
188 | stopIt=FALSE; | 188 | stopIt=FALSE; |
189 | while (stopIt==FALSE && *(++(*argv))) { | 189 | while (stopIt==FALSE && *(++(*argv))) { |
190 | switch (**argv) { | 190 | switch (**argv) { |
@@ -245,7 +245,6 @@ extern int tar_main(int argc, char **argv) | |||
245 | break; | 245 | break; |
246 | } | 246 | } |
247 | #endif | 247 | #endif |
248 | usage(tar_usage); | ||
249 | break; | 248 | break; |
250 | 249 | ||
251 | default: | 250 | default: |