summaryrefslogtreecommitdiff
path: root/applets/busybox.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>1999-10-06 20:25:32 +0000
committerEric Andersen <andersen@codepoet.org>1999-10-06 20:25:32 +0000
commit17d49efd8ce6507152d78a70574193bb1b313af6 (patch)
tree64e24302dc2575867d8a78897500e5a5b2a48398 /applets/busybox.c
parent9d3aba7b37b275350a9fe0887871da9ba73dcbd7 (diff)
downloadbusybox-w32-17d49efd8ce6507152d78a70574193bb1b313af6.tar.gz
busybox-w32-17d49efd8ce6507152d78a70574193bb1b313af6.tar.bz2
busybox-w32-17d49efd8ce6507152d78a70574193bb1b313af6.zip
More stuff.
Diffstat (limited to 'applets/busybox.c')
-rw-r--r--applets/busybox.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/applets/busybox.c b/applets/busybox.c
index 9986af389..c36bc2626 100644
--- a/applets/busybox.c
+++ b/applets/busybox.c
@@ -195,6 +195,7 @@ int main(int argc, char **argv)
195 195
196int busybox_main(int argc, char **argv) 196int busybox_main(int argc, char **argv)
197{ 197{
198 int col=0;
198 argc--; 199 argc--;
199 argv++; 200 argv++;
200 201
@@ -208,18 +209,19 @@ int busybox_main(int argc, char **argv)
208 fprintf(stderr, "BusyBox v%s (%s) multi-call binary -- GPL2\n", 209 fprintf(stderr, "BusyBox v%s (%s) multi-call binary -- GPL2\n",
209 BB_VER, BB_BT); 210 BB_VER, BB_BT);
210 fprintf(stderr, "Usage: busybox [function] [arguments]...\n"); 211 fprintf(stderr, "Usage: busybox [function] [arguments]...\n");
212 fprintf(stderr, "or\nUsage: [function] [arguments]...\n");
211 fprintf(stderr, 213 fprintf(stderr,
212 "\n\tMost people will create a symlink to busybox for each\n" 214 "\n\tMost people will create a symlink to busybox for each\n"
213 "\tfunction name, and busybox will act like whatever you invoke it as.\n"); 215 "\tfunction name, and busybox will act like whatever you invoke it as.\n");
214 fprintf(stderr, "\nCurrently defined functions:\n"); 216 fprintf(stderr, "\nCurrently defined functions:\n");
215 217
216 if (a->name != 0) {
217 fprintf(stderr, "%s", a->name);
218 a++;
219 }
220 while (a->name != 0) { 218 while (a->name != 0) {
221 fprintf(stderr, ", %s", a->name); 219 col+=fprintf(stderr, "%s%s", ((col==0)? "\t":", "), a->name);
222 a++; 220 a++;
221 if (col>60) {
222 fprintf(stderr, ",\n");
223 col=0;
224 }
223 } 225 }
224 fprintf(stderr, "\n\n"); 226 fprintf(stderr, "\n\n");
225 exit(-1); 227 exit(-1);