Age | Commit message (Collapse) | Author |
|
function old new delta
.rodata 104906 104899 -7
init_main 786 776 -10
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-17) Total: -17 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
exit_SUCCESS - 7 +7
_exit_SUCCESS - 7 +7
run_pipe 1562 1567 +5
pseudo_exec_argv 399 400 +1
finish 86 87 +1
start_stop_daemon_main 1109 1107 -2
shutdown_on_signal 38 36 -2
runsv_main 1662 1660 -2
redirect 1070 1068 -2
read_line 79 77 -2
pause_and_low_level_reboot 54 52 -2
list_i2c_busses_and_exit 483 481 -2
less_exit 12 10 -2
identify 4123 4121 -2
grep_file 1161 1159 -2
getty_main 1519 1517 -2
fsck_minix_main 2681 2679 -2
free_session 132 130 -2
fdisk_main 4739 4737 -2
clean_up_and_exit 53 51 -2
bsd_select 1566 1564 -2
bb_daemonize_or_rexec 198 196 -2
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 3/17 up/down: 21/-34) Total: -13 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
finalize 348 343 -5
parse_resolvconf 306 299 -7
list_i2c_busses_and_exit 495 483 -12
bootchartd_main 1091 1076 -15
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/4 up/down: 0/-39) Total: -39 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
packed_usage 33570 33502 -68
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
sleep1 - 9 +9
run_shutdown_and_kill_processes 97 95 -2
restore_state_and_exit 116 114 -2
reread_partition_table 67 65 -2
flush_buffer_cache 80 78 -2
chat_main 1302 1300 -2
timeout_main 310 307 -3
telnet_main 1235 1232 -3
stop_handler 86 83 -3
process_action 1078 1075 -3
nbdclient_main 1185 1182 -3
init_main 789 786 -3
getty_main 1541 1538 -3
do_time 410 407 -3
runsv_main 1682 1677 -5
pause_and_low_level_reboot 59 54 -5
inetd_main 1917 1911 -6
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/16 up/down: 9/-50) Total: -41 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Before this change, a request to reboot could be "overwritten" by e.g.
SIGHUP.
function old new delta
init_main 709 793 +84
packed_usage 33273 33337 +64
run_actions 109 117 +8
stop_handler 87 88 +1
check_delayed_sigs 340 335 -5
run 214 198 -16
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/2 up/down: 157/-21) Total: 136 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
set_sane_term 111 114 +3
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Back in 2007, commit 0c97c9d43707 ("'simple' error message functions by
Loic Grenie") introduced bb_simple_perror_msg() to allow for a lower
overhead call to bb_perror_msg() when only a string was being printed
with no parameters. This saves space for some CPU architectures because
it avoids the overhead of a call to a variadic function. However there
has never been a simple version of bb_error_msg(), and since 2007 many
new calls to bb_perror_msg() have been added that only take a single
parameter and so could have been using bb_simple_perror_message().
This changeset introduces 'simple' versions of bb_info_msg(),
bb_error_msg(), bb_error_msg_and_die(), bb_herror_msg() and
bb_herror_msg_and_die(), and replaces all calls that only take a
single parameter, or use something like ("%s", arg), with calls to the
corresponding 'simple' version.
Since it is likely that single parameter calls to the variadic functions
may be accidentally reintroduced in the future a new debugging config
option WARN_SIMPLE_MSG has been introduced. This uses some macro magic
which will cause any such calls to generate a warning, but this is
turned off by default to avoid use of the unpleasant macros in normal
circumstances.
This is a large changeset due to the number of calls that have been
replaced. The only files that contain changes other than simple
substitution of function calls are libbb.h, libbb/herror_msg.c,
libbb/verror_msg.c and libbb/xfuncs_printf.c. In miscutils/devfsd.c,
networking/udhcp/common.h and util-linux/mdev.c additonal macros have
been added for logging so that single parameter and multiple parameter
logging variants exist.
The amount of space saved varies considerably by architecture, and was
found to be as follows (for 'defconfig' using GCC 7.4):
Arm: -92 bytes
MIPS: -52 bytes
PPC: -1836 bytes
x86_64: -938 bytes
Note that for the MIPS architecture only an exception had to be made
disabling the 'simple' calls for 'udhcp' (in networking/udhcp/common.h)
because it made these files larger on MIPS.
Signed-off-by: James Byrne <james.byrne@origamienergy.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>
|
|
function old new delta
pause_and_low_level_reboot 48 57 +9
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Kconfig-language.txt was deleted in commit 4fa499a17b52b back in 2006.
Move to docs/ as suggested by Xabier Oneca:
http://lists.busybox.net/pipermail/busybox/2014-May/080914.html
Also update references to it everywhere.
Signed-off-by: Kartik Agaram <akkartik@gmail.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>
|
|
function old new delta
init_action_list 4 - -4
new_init_action 148 142 -6
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 0/1 up/down: 0/-10) Total: -10 bytes
text data bss dec hex filename
927839 481 6832 935152 e44f0 busybox_old
927833 481 6824 935138 e44e2 busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
init_main 695 712 +17
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
out 85 75 -10
udhcpd_main 1472 1461 -11
open_stdio_to_tty 98 85 -13
init_exec 245 232 -13
udhcpc_main 2763 2749 -14
do_cmd 4771 4755 -16
status_line_bold_errno 32 14 -18
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/7 up/down: 0/-95) Total: -95 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Those two spaces after tab have no effect, and always a nuisance when editing.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Kernel thread kdmflush was recognized as display manager kdm,
check for string length.
Signed-off-by: Uwe Geuder <busybox2017-ugeuder@snkmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
No code changes
Surprisingly, nice and renice are coming from different packages :)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
While at it, explain FEATURE_INIT_SYSLOG
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
It confused me more than once
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>
|
|
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>
|
|
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>
|
|
In many cases, this aqllows to drop use of opt_complementary.
Approximately -400 bytes:
function old new delta
getopt32 1423 1502 +79
opt_string 17 18 +1
OPT_STR 24 25 +1
uniq_main 416 406 -10
timeout_main 279 269 -10
sulogin_main 270 260 -10
readprofile_main 1825 1815 -10
ps_main 543 533 -10
pidof_main 245 235 -10
pgrep_main 611 601 -10
od_main 2600 2590 -10
mkfs_minix_main 2684 2674 -10
mkfs_ext2_main 2603 2593 -10
microcom_main 712 702 -10
makemime_main 315 305 -10
ionice_main 282 272 -10
inetd_main 2074 2064 -10
ifplugd_main 1144 1134 -10
halt_main 353 343 -10
getopt_main 636 626 -10
fdisk_main 2854 2844 -10
env_main 206 196 -10
dmesg_main 319 309 -10
conspy_main 1214 1204 -10
awk_main 981 971 -10
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/22 up/down: 81/-220) Total: -139 bytes
text data bss dec hex filename
919373 906 14060 934339 e41c3 busybox_old
918969 906 14060 933935 e402f busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
The result of looking at "grep -F -B2 '*fill*' busybox_unstripped.map"
text data bss dec hex filename
829901 4086 1904 835891 cc133 busybox_before
829665 4086 1904 835655 cc047 busybox
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
The config item is FEATURE_USE_BSS_TAIL. When it is off (default):
function old new delta
read_config 210 228 +18
doCommands 2279 2294 +15
ipneigh_list_or_flush 763 772 +9
ipaddr_list_or_flush 1256 1261 +5
display_process_list 1301 1306 +5
conspy_main 1378 1383 +5
do_lzo_compress 352 355 +3
do_lzo_decompress 565 567 +2
push 46 44 -2
inetd_main 2136 2134 -2
uevent_main 421 418 -3
addLines 97 92 -5
bb_common_bufsiz1 8193 1024 -7169
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 8/5 up/down: 62/-7181) Total: -7119 bytes
text data bss dec hex filename
829850 4086 9080 843016 cdd08 busybox_old
829901 4086 1904 835891 cc133 busybox_unstripped
FEATURE_USE_BSS_TAIL=y:
read_config 210 228 +18
doCommands 2279 2294 +15
ipneigh_list_or_flush 763 772 +9
ipaddr_list_or_flush 1256 1261 +5
display_process_list 1301 1306 +5
conspy_main 1378 1383 +5
do_lzo_compress 352 355 +3
do_lzo_decompress 565 567 +2
inetd_main 2136 2134 -2
bb_common_bufsiz1 8193 - -8193
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 8/1 up/down: 62/-8195) Total: -8133 bytes
text data bss dec hex filename
829850 4086 9080 843016 cdd08 busybox_old
829911 4086 880 834877 cbd3d busybox_unstripped
FIXME: setup_common_bufsiz() calls are missing.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
When launched as PID 1 and after parsing its arguments, init wipes all
all of them except argv[0] and rewrites argv[0] to contain only "init",
so that its command-line appears solely as "init" in tools such as ps.
This patch adds the FEATURE_INIT_MODIFY_CMDLINE which, if set to n, will
make init preserve all its arguments including argv[0], be they parsed or
ignored.
The original command-line used to launch init can then be retrieved in
/proc/1/cmdline on Linux, for example.
Signed-off-by: Nicolas Carrier <nicolas.carrier@parrot.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
This patch fixes compiling busybox with FEATURE_UTMP and _WTMP enabled.
musl, while not really support utmp/wtmp, provides stub functions, as well
as variables such as _PATH_UTMP, so that programs using utmp or wtmp can
still compile fine.
My reasoning for this patch is that on Exherbo, I'm currently trying to get
us to be able to use the same busybox config file for both glibc and musl
systems, using utmp/wtmp on systems that support it, and using the stubs
on musl without needing two different configs.
As of latest musl git, it provides all utmp functions needed; 1.1.12 doesn't,
but I sent a patch to Rich to add the utmp{,x}name functions expected to
exist, which was merged into musl upstream.
Signed-off-by: Kylie McClain <somasissounds@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
xfunc_has_died - 21 +21
sleep_much - 12 +12
sleep10 - 9 +9
die_func - 4 +4
fflush_stdout_and_exit 35 36 +1
builtin_type 121 119 -2
die_sleep 4 - -4
xfunc_die 60 24 -36
hush_main 1128 1011 -117
die_jmp 156 - -156
------------------------------------------------------------------------------
(add/remove: 4/2 grow/shrink: 1/3 up/down: 47/-315) Total: -268 bytes
text data bss dec hex filename
939992 992 17652 958636 ea0ac busybox_old
939880 992 17496 958368 e9fa0 busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
UTMP is SVID legacy, UTMPX is mandated by POSIX.
Glibc and uClibc have identical layout of UTMP and UTMPX, both of these
libc treat _PATH_UTMPX as _PATH_UTMP so from a user-perspective nothing
changes except the names of the API entrypoints.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
function old new delta
update_utmp_DEAD_PROCESS - 17 +17
telnetd_main 1685 1674 -11
mark_terminated 56 45 -11
handle_sigchld 74 63 -11
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
this is racy wrt various libc functions such as syslog()
function old new delta
check_delayed_sigs 182 352 +170
init_main 772 728 -44
restart_handler 74 - -74
halt_reboot_pwoff 79 - -79
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 1/1 up/down: 170/-197) Total: -27 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Apparently, some *BSD variants (and maybe some other OSes) does not define
SIGPWR signal. So since commit 760fc6debcba8c, busybox fails to build on
such platforms. Fix this.
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Most init processes implement a handler for SIGPWR that gracefully
stops all child processes when shutting down a machine. Some other
technologies rely on this signal - e.g. Busybox powered LXC
containers.
This patch makes busybox init halt when receiving SIGPWR.
Signed-off-by: Bogdan Purcareata <bogdan.purcareata@freescale.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
nuke_str - 15 +15
ask_and_check_password_extended 215 206 -9
init_main 781 771 -10
nuke_str 27 - -27
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 0/2 up/down: 15/-46) Total: -31 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Yuan-Hsiang Lee <yhlee@ubnt.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>
|
|
This feature was removed in 72c99af
It is useful when process is removed from inittab and later added
back, but never terminated. It prevents init from spawning duplicate.
function old new delta
check_delayed_sigs 176 182 +6
Signed-off-by: Paulius Zaleckas <paulius.zaleckas@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
We store init actions forever. 256 bytes per action means that
a typical inittab of ~10 commands uses 2.5k just to remember
command strings - which are usually _much_ shorter than 256 bytes.
At a cost of a bit more code, it's possible to allocate
only actually needed amount.
function old new delta
init_exec 224 248 +24
new_init_action 140 142 +2
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
init_main 920 781 -139
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|