summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDenis Vlasenko2007-04-09 13:04:50 +0000
committerDenis Vlasenko2007-04-09 13:04:50 +0000
commit7e754f12d304704d44e10fd4d2fdb8710526656e (patch)
tree9aa16703d48b9a7a38ccaec3759a19e95e976383 /include
parent2dfdd44d9d6c3984501683bbac2e78b18eeae1e7 (diff)
downloadbusybox-7e754f12d304704d44e10fd4d2fdb8710526656e.zip
busybox-7e754f12d304704d44e10fd4d2fdb8710526656e.tar.gz
Implement first instance of NOFORK applet - echo
find: use NOFORK/NOEXEC; small -exec buglet also eliminated vfork_daemon_rexec: honor PREFER_APPLETS echo: small size improvements find -exec echo {} \; with PREFER_APPLETS=y runs 4 times faster
Diffstat (limited to 'include')
-rw-r--r--include/applets.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/applets.h b/include/applets.h
index f411aa2..f20b796 100644
--- a/include/applets.h
+++ b/include/applets.h
@@ -28,24 +28,28 @@ s - suid type:
# define APPLET_NOUSAGE(name,main,l,s) int main##_main(int argc, char **argv);
# define APPLET_ODDNAME(name,main,l,s,name2) int main##_main(int argc, char **argv);
# define APPLET_NOEXEC(name,main,l,s,name2) int main##_main(int argc, char **argv);
+# define APPLET_NOFORK(name,main,l,s,name2) int main##_main(int argc, char **argv);
#elif defined(MAKE_USAGE) && ENABLE_FEATURE_VERBOSE_USAGE
# define APPLET(name,l,s) name##_trivial_usage "\n\n" name##_full_usage "\0"
# define APPLET_NOUSAGE(name,main,l,s) "\b\0"
# define APPLET_ODDNAME(name,main,l,s,name2) name2##_trivial_usage "\n\n" name2##_full_usage "\0"
# define APPLET_NOEXEC(name,main,l,s,name2) name2##_trivial_usage "\n\n" name2##_full_usage "\0"
+# define APPLET_NOFORK(name,main,l,s,name2) name2##_trivial_usage "\n\n" name2##_full_usage "\0"
#elif defined(MAKE_USAGE) && !ENABLE_FEATURE_VERBOSE_USAGE
# define APPLET(name,l,s) name##_trivial_usage "\0"
# define APPLET_NOUSAGE(name,main,l,s) "\b\0"
# define APPLET_ODDNAME(name,main,l,s,name2) name2##_trivial_usage "\0"
# define APPLET_NOEXEC(name,main,l,s,name2) name2##_trivial_usage "\0"
+# define APPLET_NOFORK(name,main,l,s,name2) name2##_trivial_usage "\0"
#elif defined(MAKE_LINKS)
# define APPLET(name,l,c) LINK l name
# define APPLET_NOUSAGE(name,main,l,s) LINK l name
# define APPLET_ODDNAME(name,main,l,s,name2) LINK l name
# define APPLET_NOEXEC(name,main,l,s,name2) LINK l name
+# define APPLET_NOFORK(name,main,l,s,name2) LINK l name
#else
const struct BB_applet applets[] = { /* name,main,location,need_suid */
@@ -53,6 +57,7 @@ s - suid type:
# define APPLET_NOUSAGE(name,main,l,s) {#name,main##_main,l,s},
# define APPLET_ODDNAME(name,main,l,s,name2) {#name,main##_main,l,s},
# define APPLET_NOEXEC(name,main,l,s,name2) {#name,main##_main,l,s,1},
+# define APPLET_NOFORK(name,main,l,s,name2) {#name,main##_main,l,s,1,1},
#endif
#if ENABLE_INSTALL_NO_USR
@@ -118,7 +123,7 @@ USE_DUMPKMAP(APPLET(dumpkmap, _BB_DIR_BIN, _BB_SUID_NEVER))
USE_APP_DUMPLEASES(APPLET(dumpleases, _BB_DIR_USR_BIN, _BB_SUID_NEVER))
//USE_E2FSCK(APPLET(e2fsck, _BB_DIR_SBIN, _BB_SUID_NEVER))
//USE_E2LABEL(APPLET_NOUSAGE(e2label, tune2fs, _BB_DIR_SBIN, _BB_SUID_NEVER))
-USE_ECHO(APPLET_NOEXEC(echo, echo, _BB_DIR_BIN, _BB_SUID_NEVER, echo))
+USE_ECHO(APPLET_NOFORK(echo, echo, _BB_DIR_BIN, _BB_SUID_NEVER, echo))
USE_ED(APPLET(ed, _BB_DIR_BIN, _BB_SUID_NEVER))
USE_FEATURE_GREP_EGREP_ALIAS(APPLET_NOUSAGE(egrep, grep, _BB_DIR_BIN, _BB_SUID_NEVER))
USE_EJECT(APPLET(eject, _BB_DIR_USR_BIN, _BB_SUID_NEVER))