Age | Commit message (Collapse) | Author |
|
function old new delta
getoptscmd 527 540 +13
getjob 280 286 +6
makejob 278 282 +4
forkchild 602 600 -2
waitcmd 208 205 -3
showjob 382 379 -3
getstatus 83 80 -3
dowait 408 405 -3
freejob 93 89 -4
fg_bgcmd 290 286 -4
forkshell 260 255 -5
killcmd 224 218 -6
jobno 17 11 -6
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/10 up/down: 23/-39) Total: -16 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
No code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
No code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function 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 759 714 -45
fsck_minix_main 2969 2921 -48
conspy_main 1197 1135 -62
rawmode 99 36 -63
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/6 up/down: 118/-275) Total: -157 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Mike 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
Of course, not all numerous bash tricks of [[ ]] are implemented...
function old new delta
bltins2 60 72 +12
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Splitting 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>
|
|
Splitting 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>
|
|
Many 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>
|
|
It controls whether we take input.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
get_wh - 27 +27
tcsetattr_tty_TCSANOW - 18 +18
gotsig 35 27 -8
more_main 835 759 -76
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 0/2 up/down: 45/-84) Total: -39 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
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>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
The former name had no INIT anywhere in its name, sounded generic
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
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>
|
|
This makes hash and ash more symmetrical wrt config menu and config
options.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Redundant 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>
|
|
Busybox 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 specify e.g.
CONFIG_EXTRA_CFLAGS="-DFAST_FUNC= -flto"
and compile with LTO without a source code hack.
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
* 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.
* Move kbuild lines about shells' kill builtins from Kbuild.src to
kill.c, to accompany the new HAVE_SH_KILL macro. I hope this would
make maintanence a little bit easier.
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
It'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>
|
|
ash 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>
|
|
While at it, fix one warning in modprobe-small.c
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
These 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),
this makes pos positive but smaller than header.dict_size, and loop exits.
Now we'll just check for negative result of subtraction, which is less code:
function old new delta
unpack_lzma_stream 2659 2641 -18
(I hope 2 Gbyte+ dictionaries won't be in use soon).
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Large 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>
|
|
function old new delta
unzip_main 2476 2491 +15
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
unzip_main 2376 2476 +100
bbunpack 750 745 -5
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Was 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>
|
|
(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_SMALL_CHECK_ALREADY_LOADED.
Don't bother with the '-r' option check if only rmmod is built (assume
true then), or when neither rmmod or mobprobe is built (assume false
then).
Size comparison before and after the change (single applet
configuration):
text data bss dec hex filename
34778 946 112 35836 8bfc old/busybox_DEPMOD
34151 946 112 35209 8989 new/busybox_DEPMOD
34903 946 112 35961 8c79 old/busybox_INSMOD
28316 778 112 29206 7216 new/busybox_INSMOD
35228 962 112 36302 8dce old/busybox_LSMOD
5011 706 40 5757 167d new/busybox_LSMOD
34830 946 112 35888 8c30 old/busybox_MODPROBE
34795 946 112 35853 8c0d new/busybox_MODPROBE
34718 946 112 35776 8bc0 old/busybox_RMMOD
7502 714 104 8320 2080 new/busybox_RMMOD
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Idea copied from the "ip" applet.
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
if sourced file "shift"ed argvs so that $1 is NULL, restore wasn't done.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
if sourced file "shift"ed argvs so that $1 is NULL, restore wasn't done.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function 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 98 - -98
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 2/2 up/down: 24/-146) Total: -122 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Also 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
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/0 up/down: 337/0) Total: 337 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
parse_jobspec 83 133 +50
builtin_wait 278 283 +5
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
When 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 <ska-dietlibc@skarnet.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
With 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>
|
|
This 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_stream functions
code. In other words, the gzip, lzma and xz decompressors' code are
linked into the binary unnecessarily.
This happens because SEAMLESS_MAGIC != 0 and compiler is unable
to figure out that SEAMLESS_MAGIC bit is never set.
Fix this by disabling SEAMLESS_MAGIC option flag (setting its value
to 0) when zcat is disabled. This will help the compiler optimize out
bbunpack() and no longer generate open_zipped() function call.
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
ix 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>
|
|
While 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>
|
|
commit e19923f6652a638ac39c84012e97f52cf5a7568e deleted clearredir()
call in shellexec():
ash: [REDIR] Remove redundant CLOEXEC calls
Upstream commit:
Now that we're marking file descriptors as CLOEXEC in savefd, we no longer
need to close them on exec or in setinputfd.
but it missed one place where we don't set CLOEXEC. Fixing this.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|