diff options
Diffstat (limited to 'applets')
-rw-r--r-- | applets/busybox.c | 12 | ||||
-rwxr-xr-x | applets/busybox.mkll | 16 |
2 files changed, 14 insertions, 14 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 | ||
196 | int busybox_main(int argc, char **argv) | 196 | int 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); |
diff --git a/applets/busybox.mkll b/applets/busybox.mkll index e43a1ccb0..f79462b7f 100755 --- a/applets/busybox.mkll +++ b/applets/busybox.mkll | |||
@@ -2,16 +2,14 @@ | |||
2 | #Make busybox links list file | 2 | #Make busybox links list file |
3 | 3 | ||
4 | DF="busybox.def.h" | 4 | DF="busybox.def.h" |
5 | MF="main.c" | 5 | MF="busybox.c" |
6 | 6 | ||
7 | LIST="$(sed -n '/^#define/{s/^#define //p;}' $DF)" | 7 | LIST="$(sed -n '/^#define/{s/^#define //p;}' $DF)" |
8 | 8 | ||
9 | for def in ${LIST}; do | 9 | for def in ${LIST}; do |
10 | 10 | i=`sed -n 's/^#ifdef '$def'.*\/\/\(.*$\)/\/\1\//gp' $MF` | |
11 | set -- $(sed -n '/^#ifdef '$def'[ +| +].*/,/^#endif/{s/.*\/\///p; /^{ /{ s/^{ "//; s/",.*$//p;}; }' $MF) | 11 | j=`sed -n '/^#ifdef '$def'.*/,/^#endif/{ s/.*\"\(.*\)\".*/\1/gp; }' $MF` |
12 | path=$1; shift | 12 | for k in $j; do |
13 | 13 | echo $i$k | |
14 | for n in $@; do | ||
15 | echo "$path/$n" | ||
16 | done | ||
17 | done | 14 | done |
15 | done | ||