mirror of
https://git.busybox.net/busybox
synced 2026-01-31 16:43:21 +00:00
Most BusyBox applets respond to the '--help' option by printing a usage message. This is normally handled by busybox_main() so applet main routines don't have support for '--help'. In standalone shell mode with FEATURE_SH_NOFORK enabled nofork applets are invoked directly, bypassing busybox_main(). This results in inconsistent handling of '--help': - applets which call getopt() report "unrecognized option '--help'" and print help anyway; - realpath says "--help: No such file or directory" and doesn't print help; - usleep says "invalid number '--help'" and doesn't print help. Avoid inconsistency by checking for '--help' in run_nofork_applet(). Bug found by Ron Yorston. function old new delta show_usage_if_dash_dash_help - 70 +70 run_nofork_applet 347 362 +15 run_applet_no_and_exit 432 365 -67 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/1 up/down: 85/-67) Total: 18 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| applet_metadata.h | ||
| applets.h.sh | ||
| applets.src.h | ||
| ar_.h | ||
| bb_archive.h | ||
| bb_e2fs_defs.h | ||
| busybox.h | ||
| dump.h | ||
| fix_u32.h | ||
| grp_.h | ||
| inet_common.h | ||
| libbb.h | ||
| liblzo_interface.h | ||
| platform.h | ||
| pwd_.h | ||
| rtc_.h | ||
| shadow_.h | ||
| unicode.h | ||
| usage.src.h | ||
| volume_id.h | ||
| xatonum.h | ||
| xregex.h | ||