summaryrefslogtreecommitdiff
path: root/include/applets.h
diff options
context:
space:
mode:
authorDenis Vlasenko2007-11-28 06:49:03 +0000
committerDenis Vlasenko2007-11-28 06:49:03 +0000
commit1aa7e477b1b727db77cac2d717f0fcca40587f78 (patch)
tree247171517f0e01d32a71a5e96f4bef462cc0e9c6 /include/applets.h
parent79c6904faff1ebd4bf4b7d9cd0c20ca70f4cec75 (diff)
downloadbusybox-1aa7e477b1b727db77cac2d717f0fcca40587f78.zip
busybox-1aa7e477b1b727db77cac2d717f0fcca40587f78.tar.gz
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.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/include/applets.h b/include/applets.h
index 2f31a58..f35a1d8 100644
--- a/include/applets.h
+++ b/include/applets.h
@@ -59,12 +59,12 @@ s - suid type:
# define APPLET_NOFORK(name,main,l,s,name2) LINK l name
#else
- const struct bb_applet applets[] = { /* name, main, location, need_suid */
-# define APPLET(name,l,s) { #name, name##_main USE_FEATURE_INSTALLER(,l) USE_FEATURE_SUID(,s) },
-# define APPLET_NOUSAGE(name,main,l,s) { #name, main##_main USE_FEATURE_INSTALLER(,l) USE_FEATURE_SUID(,s) },
-# define APPLET_ODDNAME(name,main,l,s,name2) { #name, main##_main USE_FEATURE_INSTALLER(,l) USE_FEATURE_SUID(,s) },
-# define APPLET_NOEXEC(name,main,l,s,name2) { #name, main##_main USE_FEATURE_INSTALLER(,l) USE_FEATURE_SUID(,s) USE_FEATURE_PREFER_APPLETS(,1) },
-# 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) },
+ static struct bb_applet applets[] = { /* name, main, location, need_suid */
+# define APPLET(name,l,s) { #name, #name, l, s },
+# define APPLET_NOUSAGE(name,main,l,s) { #name, #main, l, s },
+# define APPLET_ODDNAME(name,main,l,s,name2) { #name, #main, l, s },
+# define APPLET_NOEXEC(name,main,l,s,name2) { #name, #main, l, s, 1 },
+# define APPLET_NOFORK(name,main,l,s,name2) { #name, #main, l, s, 1, 1 },
#endif
#if ENABLE_INSTALL_NO_USR
@@ -385,7 +385,6 @@ USE_GUNZIP(APPLET_ODDNAME(zcat, gunzip, _BB_DIR_BIN, _BB_SUID_NEVER, zcat))
USE_ZCIP(APPLET(zcip, _BB_DIR_SBIN, _BB_SUID_NEVER))
#if !defined(PROTOTYPES) && !defined(NAME_MAIN_CNAME) && !defined(MAKE_USAGE)
- { NULL }
};
#endif