diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-11-28 06:49:03 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-11-28 06:49:03 +0000 |
commit | 1aa7e477b1b727db77cac2d717f0fcca40587f78 (patch) | |
tree | 247171517f0e01d32a71a5e96f4bef462cc0e9c6 /include/applets.h | |
parent | 79c6904faff1ebd4bf4b7d9cd0c20ca70f4cec75 (diff) | |
download | busybox-w32-1aa7e477b1b727db77cac2d717f0fcca40587f78.tar.gz busybox-w32-1aa7e477b1b727db77cac2d717f0fcca40587f78.tar.bz2 busybox-w32-1aa7e477b1b727db77cac2d717f0fcca40587f78.zip |
reorganize applet table. Eliminates pointers to names.
Should be a big win for libbusybox. busybox wins too:
text data bss dec hex filename
776524 929 9100 786553 c0079 busybox_old
775903 929 9100 785932 bfe0c busybox_unstripped
Diffstat (limited to 'include/applets.h')
-rw-r--r-- | include/applets.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/include/applets.h b/include/applets.h index 2f31a587f..f35a1d80b 100644 --- a/include/applets.h +++ b/include/applets.h | |||
@@ -59,12 +59,12 @@ s - suid type: | |||
59 | # define APPLET_NOFORK(name,main,l,s,name2) LINK l name | 59 | # define APPLET_NOFORK(name,main,l,s,name2) LINK l name |
60 | 60 | ||
61 | #else | 61 | #else |
62 | const struct bb_applet applets[] = { /* name, main, location, need_suid */ | 62 | static struct bb_applet applets[] = { /* name, main, location, need_suid */ |
63 | # define APPLET(name,l,s) { #name, name##_main USE_FEATURE_INSTALLER(,l) USE_FEATURE_SUID(,s) }, | 63 | # define APPLET(name,l,s) { #name, #name, l, s }, |
64 | # define APPLET_NOUSAGE(name,main,l,s) { #name, main##_main USE_FEATURE_INSTALLER(,l) USE_FEATURE_SUID(,s) }, | 64 | # define APPLET_NOUSAGE(name,main,l,s) { #name, #main, l, s }, |
65 | # define APPLET_ODDNAME(name,main,l,s,name2) { #name, main##_main USE_FEATURE_INSTALLER(,l) USE_FEATURE_SUID(,s) }, | 65 | # define APPLET_ODDNAME(name,main,l,s,name2) { #name, #main, l, s }, |
66 | # define APPLET_NOEXEC(name,main,l,s,name2) { #name, main##_main USE_FEATURE_INSTALLER(,l) USE_FEATURE_SUID(,s) USE_FEATURE_PREFER_APPLETS(,1) }, | 66 | # define APPLET_NOEXEC(name,main,l,s,name2) { #name, #main, l, s, 1 }, |
67 | # define APPLET_NOFORK(name,main,l,s,name2) { #name, main##_main USE_FEATURE_INSTALLER(,l) USE_FEATURE_SUID(,s) USE_FEATURE_PREFER_APPLETS(,1 ,1) }, | 67 | # define APPLET_NOFORK(name,main,l,s,name2) { #name, #main, l, s, 1, 1 }, |
68 | #endif | 68 | #endif |
69 | 69 | ||
70 | #if ENABLE_INSTALL_NO_USR | 70 | #if ENABLE_INSTALL_NO_USR |
@@ -385,7 +385,6 @@ USE_GUNZIP(APPLET_ODDNAME(zcat, gunzip, _BB_DIR_BIN, _BB_SUID_NEVER, zcat)) | |||
385 | USE_ZCIP(APPLET(zcip, _BB_DIR_SBIN, _BB_SUID_NEVER)) | 385 | USE_ZCIP(APPLET(zcip, _BB_DIR_SBIN, _BB_SUID_NEVER)) |
386 | 386 | ||
387 | #if !defined(PROTOTYPES) && !defined(NAME_MAIN_CNAME) && !defined(MAKE_USAGE) | 387 | #if !defined(PROTOTYPES) && !defined(NAME_MAIN_CNAME) && !defined(MAKE_USAGE) |
388 | { NULL } | ||
389 | }; | 388 | }; |
390 | #endif | 389 | #endif |
391 | 390 | ||