fli4l
  1. fli4l

busybox

Public
AuthorCommitMessageCommit dateIssues
Denys VlasenkoDenys Vlasenko
098b713c7b5ash: commented-out possible fix for 7694bash has a feature: it restores termios after a successful wait for a foreground job which had at least one stopped or sigkilled member. The probable rationale is that SIGSTOP and SIGKILL can preclude task from properly restoring tty state. Should we do this too? A reproducer: ^Z an interactive python: $ python Python 2.7.12 (...) >>> ^Z { python leaves tty in -icanon -echo state. We do su...
Denys VlasenkoDenys Vlasenko
4c179373e07ash: 16-bit ->nprocs field is a pain for many CPUsfunction old new delta getoptscmd 527 540 +13 getjob 280 286 +6 makejob 278 282 +4 forkchild 602 600 -2 waitcmd ...
Denys VlasenkoDenys Vlasenko
ed15dde60a7Move FEATURE_AUTOWIDTH config option to two applets which use itNo code changes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys VlasenkoDenys Vlasenko
6c1f348fa79Move FEATURE_USE_TERMIOS config option to two applets which use itNo code changes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys VlasenkoDenys Vlasenko
01ccdd1d3c5libbb: consolidate the code to set termios unbuffered modefunction old new delta set_termios_to_raw - 116 +116 count_lines 72 74 +2 powertop_main 1458 1430 -28 top_main 943 914 -29 more_main ...
Denys VlasenkoDenys Vlasenko
8944c67b1f6hush: reinstate [[ builtinMike deleted it: commit 39456a18a104b228de240b265bd943251219849d Author: Mike Frysinger <vapier@gentoo.org> Date: Sat Mar 28 12:21:57 2009 +0000 stop lying about [[ test support probably because it was not properly ifdefed around, and was enabled even when bash compat is off. I just tested it - it works: $ [ *.diff = z.diff ]; echo $? 0 $ [[ *.diff = z.diff ]]; echo $? 1 ...
Kang-Che SungKang-Che Sung
027d3ab57d6hush: split bash compatible extensions into separate defines. No code changesSplitting these options makes it self-documenting about what bash-compatible features we have. Signed-off-by: Kang-Che Sung <explorer09@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys VlasenkoDenys Vlasenko
7d4aec0c3ecash: split bash compatible extensions into separate defines. No code changesSplitting these options makes it self-documenting about what bash-compatible features we have. Signed-off-by: Kang-Che Sung <explorer09@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys VlasenkoDenys Vlasenko
a8a075acfeebusybox: stop depending on FEATURE_AUTOWIDTH for applet listMany other appletw don't - they unconditionally use get_terminal_wodth(), and here the amount of code saved by FEATURE_AUTOWIDTH=n is tiny. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys VlasenkoDenys Vlasenko
0fd9fb4244atop: FEATURE_USE_TERMIOS shouldn't control reading of screen sizeIt controls whether we take input. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys VlasenkoDenys Vlasenko
c5891fe1af8more: hardcode FEATURE_USE_TERMIOS=y in this applet; code shrinkfunction old new delta get_wh - 27 +27 tcsetattr_tty_TCSANOW - 18 +18 gotsig 35 27 -8 more_main 835 759 -76 --------------------------------...
Denys VlasenkoDenys Vlasenko
80f806cac9bhush: shorten output of "help" builtin text data bss dec hex filename 891272 485 6856 898613 db635 busybox_old 891232 485 6856 898573 db60d busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys VlasenkoDenys Vlasenko
a1184af5f87hush: reorder builtins (cd and pwd ought to be close, etc), no code changesSigned-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys VlasenkoDenys Vlasenko
f35ad3bd128init: rename FEATURE_EXTRA_QUIET -> FEATURE_INIT_QUIETThe former name had no INIT anywhere in its name, sounded generic Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys VlasenkoDenys Vlasenko
2b4c258e74dash: revert "make dot command search current directory first"Reverts this: commit 8ad78e1ec7b2e873953f9f476fb63b5893526c39 Author: Denis Vlasenko <vda.linux@googlemail.com> Date: Sun Feb 15 12:40:30 2009 +0000 ash: make dot command search current directory first, as bash does. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys VlasenkoDenys Vlasenko
265062d59ddshells: make hush test optional, rename ASH_BUILTIN_foo -> ASH_fooThis makes hash and ash more symmetrical wrt config menu and config options. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys VlasenkoDenys Vlasenko
f560422fa07Big cleanup in config help and descriptionRedundant help texts (one which only repeats the description) are deleted. Descriptions and help texts are trimmed. Some config options are moved, even across menus. No config option _names_ are changed. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Kang-Che SungKang-Che Sung
f10f7a21d40Allow FAST_FUNC to be overridden at build timeBusybox uses FAST_FUNC macro to tweak with IA-32 calling conventions in order to make the function call slightly smaller or slightly faster. However, when I experiment with GCC's LTO (Link Time Optimization), I discovered that FAST_FUNC could hinder LTO's optimization so that the resulting executable become a few bytes larger (than what is compiled without FAST_FUNC). This change allows to spe...IA-32
Kang-Che SungKang-Che Sung
61a91af63dbkill: optimizations for single-applet build* Fix a bug with a configuration in which the shell's kill builtin would be mistreated as a killall command (i.e. '-q' works, and 'kill process_name' succeeds when it shouldn't): CONFIG_ASH_JOB_CONTROL=y CONFIG_HUSH_KILL=y # CONFIG_KILL is not set CONFIG_KILLALL=y # CONFIG_KILLALL5 is not set * Optimize out unneeded code when the relevant applets are not selected. *...
Denys VlasenkoDenys Vlasenko
1cc6804f698hush: make echo builtin optionalIt's a bit overkill (who would want it off?) but ash already has it configurable. Let's be symmetric. Also tweak kbuild logic to use ASH_BUILTIN_ECHO to select echo.o, not ASH. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Kang-Che SungKang-Che Sung
53487a8d221kill: need not build kill.c when ash's job control is offash kill builtin depends on the job control config option. Signed-off-by: Kang-Che Sung <explorer09@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys VlasenkoDenys Vlasenko
e7b54d0fccemake_single_applets.sh: show errors and warningsWhile at it, fix one warning in modprobe-small.c Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys VlasenkoDenys Vlasenko
590402bb55bunlzma: expand comments, no code changesSigned-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys VlasenkoDenys Vlasenko
3989e5adf45unlzma: fix erroneous "while" instead of "if". Closes 4682These parts of the code essentially check whether stepping back by rep0 goes negative or not. LZMA SDK from lzma1604.7z has the following in the corresponding places: ... = dic[dicPos - rep0 + (dicPos < rep0 ? dicBufSize : 0)] Clearly, not loop here. Technically, "while" here works: if condition is false (because pos underflowed), it iterates once, adds header.dict_size (a.k.a. dicBufSize),...
Denys VlasenkoDenys Vlasenko
8c1d857d258unzip: match "Defl:?" display with info-zip; cosmetic code shufflingLarge nested indented code blocks made more sane with a few gotos. function old new delta unzip_main 2491 2519 +28 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys VlasenkoDenys Vlasenko
6b4f4b52845unzip: optional support for xzfunction old new delta unzip_main 2476 2491 +15 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys VlasenkoDenys Vlasenko
2a0867a5ed2unzip: optional support for bzip2 and lzmafunction old new delta unzip_main 2376 2476 +100 bbunpack 750 745 -5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys VlasenkoDenys Vlasenko
6bf52b615d7modprobe-small: build fixesWas throwing some build errors: CONFIG_MODPROBE_SMALL=y CONFIG_DEPMOD=y CONFIG_LSMOD=y CONFIG_MODINFO=y CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED=y error: unused variable 'exitcode' modutils/modprobe-small.c: In function 'modprobe_main': modutils/modprobe-small.c:1060: error: control reaches end of non-void function Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Explorer09Explorer09
80172e46221modprobe-small: optimizations for single applet build(I'm requesting for a review first because I fear such an aggressive change could lead to bugs. While I observe the sizes have reduced, I haven't test the functionality of each applet after that. So please test before merging.) Aggressively cut off unneeded code when the relevant applets are not built. Correct dependencies of FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE and FEATURE_MODPROBE_SMAL...
Kang-Che SungKang-Che Sung
b130f9f758bAllow 'gzip -d' and 'bzip2 -d' without gunzip or bunzip2Idea copied from the "ip" applet. Signed-off-by: Kang-Che Sung <explorer09@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys VlasenkoDenys Vlasenko
fb87d93d1e0ash: fix a bug in argv restoration after sourcing a fileif sourced file "shift"ed argvs so that $1 is NULL, restore wasn't done. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys VlasenkoDenys Vlasenko
2b1559056cfhush: fix a bug in argv restoration after sourcing a fileif sourced file "shift"ed argvs so that $1 is NULL, restore wasn't done. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys VlasenkoDenys Vlasenko
4e4f88e569ehush: global_args_malloced is used only if set builtin is enabledfunction old new delta run_pipe 1623 1635 +12 builtin_source 210 222 +12 save_and_replace_G_args 70 60 -10 builtin_shift 132 94 -38 restore_G_args ...
Denys VlasenkoDenys Vlasenko
cc2fd5a9867hush: fix 'defined but not used' warningSigned-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys VlasenkoDenys Vlasenko
5362cc4b8cahush: remove redundand test for ENABLE_HUSH_JOBSigned-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys VlasenkoDenys Vlasenko
fd68f1e80dbhush: fix kill builtin without jobs supportSigned-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys VlasenkoDenys Vlasenko
442a414d662typo fixSigned-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys VlasenkoDenys Vlasenko
41ade05cacdhush: conditionalize print_escaped() on EXPORT || TRAPSigned-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys VlasenkoDenys Vlasenko
4471969db21hush: make memleak builtin optionalSigned-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys VlasenkoDenys Vlasenko
6ec76d87192hush: make export builtin optionalSigned-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys VlasenkoDenys Vlasenko
d5933b11253hush: make umask builtin optionalSigned-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys VlasenkoDenys Vlasenko
10d5ece64aehush: make set/unset builtins optionalSigned-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys VlasenkoDenys Vlasenko
7a85c60e7e3hush: make read and trap builtins optionalSigned-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys VlasenkoDenys Vlasenko
1125d7d6801hush: kill builtin and kill %jobspec supportAlso made it and printf, type and wait builtins optional. function old new delta builtin_kill - 323 +323 bltins1 336 348 +12 builtin_type 114 116 +2 ----------------------------------------------...
Denys VlasenkoDenys Vlasenko
d5b5c2fa151hush: support %%, %+ and % jobspec (meaning "current job")function old new delta parse_jobspec 83 133 +50 builtin_wait 278 283 +5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Laurent BercotLaurent Bercot
0ef478f01bbhttpd: fix address family for reverse proxy client socketWhen httpd proxies a request to another server, it first creates an AF_INET socket, then resolves the server name to a sockaddr, then connects to it. This fails if the server name resolves to an IPv6 address. This patch ensures that the socket is created with the correct address family (AF_INET6 if the server resolves to an IPv6 address and AF_INET otherwise). Signed-off-by: Laurent Bercot <s...
Kang-Che SungKang-Che Sung
4d06b314532build system: no longer prompt for PLATFORM_LINUX optionWith the new "select PLATFORM_LINUX" mechanism (commit e3b1a1fd28558f7a1b3c0ec33313bedb675be8a1), the PLATFORM_LINUX option alone no longer has any purpose of changing program behavior or affecting compiled code. So there is no longer need to prompt user of this config question. Signed-off-by: Kang-Che Sung <explorer09@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Kang-Che SungKang-Che Sung
d5e7ff02921bunzip2: fix code bloat caused by zcat's seamless magicThis example single-applet configuration would trigger the bloat: CONFIG_FEATURE_SEAMLESS_XZ=y CONFIG_FEATURE_SEAMLESS_LZMA=y CONFIG_FEATURE_SEAMLESS_BZ2=y CONFIG_FEATURE_SEAMLESS_GZ=y CONFIG_BUNZIP2=y # CONFIG_ZCAT is not set # All other applets disabled Here, the resulting "busybox-bunzip2" binary would contain unpack_gz_stream, unpack_lzma_stream and unpack_xz_s...
Kang-Che SungKang-Che Sung
a474728e825ash: fix "kill %1" not working if CONFIG_ASH is disabledix ash "kill %1" not working if CONFIG_ASH is disabled but ash is launched by 'sh' or 'bash' name Signed-off-by: Kang-Che Sung <explorer09@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Denys VlasenkoDenys Vlasenko
0ffac1cc22eunzip: do not use CDF.extra_len, read local file header. Closes 9536While at it, shorten many field and variable names. function old new delta unzip_main 2334 2376 +42 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>