Age | Commit message (Collapse) | Author |
|
FreeBSD using procctl instead of Linux prctl
Signed-off-by: Alex Samorukov <samm@os2.kiev.ua>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
launch_helper 188 193 +5
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
13 bytes are not worth the risk of doing something iffy after vfork().
Let's have much clearer code there.
function old new delta
launch_helper 175 188 +13
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
send_mail_command 85 55 -30
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
popmaildir_main 812 823 +11
sendmail_main 1295 1301 +6
makemime_main 291 288 -3
parse 970 966 -4
reformime_main 107 100 -7
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/3 up/down: 17/-14) Total: 3 bytes
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>
|
|
function old new delta
printstr_base64 - 22 +22
printbuf_base64 - 11 +11
printfile_base64 - 9 +9
makemime_main 305 294 -11
encode_n_base64 236 223 -13
sendmail_main 1380 1366 -14
encode_base64 36 - -36
------------------------------------------------------------------------------
(add/remove: 3/1 grow/shrink: 0/3 up/down: 42/-74) Total: -32 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Implement the -am argument to allow choosing an AUTH method.
For now only PLAIN and LOGIN are supported, but others can be added
easily in the future.
AUTH PLAIN required adding a new variant of encode_base64() capable of
handling NUL characters in the input string; the old function is now a
wrapper for the newer one.
function old new delta
encode_n_base64 - 236 +236
sendmail_main 1199 1380 +181
packed_usage 32873 32877 +4
encode_base64 242 36 -206
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/1 up/down: 421/-206) Total: 215 bytes
Signed-off-by: Raffaello D. Di Napoli <rafdev@dinapo.li>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
bb_ask_noecho 313 330 +17
get_cred_or_die 125 115 -10
passwd_main 995 958 -37
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/2 up/down: 17/-47) Total: -30 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
bb_ask_y_confirmation
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
"builtin" below is atexit's 32-element global array of functions to call.
function old new delta
top_main 879 889 +10
launch_helper 185 193 +8
powertop_main 1555 1559 +4
sed_main 651 650 -1
slot 4 - -4
call 4 - -4
atexit 23 - -23
kill_helper 31 - -31
__funcs_on_exit 120 - -120
__cxa_atexit 168 - -168
builtin 260 - -260
------------------------------------------------------------------------------
(add/remove: 0/8 grow/shrink: 3/1 up/down: 22/-611) Total: -589 bytes
text data bss dec hex filename
912364 563 6132 919059 e0613 busybox_old
912035 563 5844 918442 e03aa busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Benefits are: drops reference to out-of-line putchar(), fixes a few cases
of failed string merge.
function old new delta
i2cdump_main 1488 1502 +14
sha256_process_block64 423 433 +10
sendmail_main 1183 1185 +2
list_table 1114 1116 +2
i2cdetect_main 1235 1237 +2
fdisk_main 2852 2854 +2
builtin_type 119 121 +2
unicode_conv_to_printable2 325 324 -1
scan_recursive 380 378 -2
mkfs_minix_main 2687 2684 -3
buffer_fill_and_print 178 169 -9
putchar 152 - -152
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 7/4 up/down: 34/-167) Total: -133 bytes
text data bss dec hex filename
937788 932 17676 956396 e97ec busybox_old
937564 932 17676 956172 e970c busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
sendmail_main 934 939 +5
smtp_checkp 167 165 -2
packed_usage 28634 28621 -13
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
xmalloc_reads
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
|
function old new delta
read_base64 - 378 +378
uudecode_main 306 315 +9
parse 953 958 +5
read_stduu 250 254 +4
base64_main 217 219 +2
read_base64 358 - -358
decode_base64 371 - -371
------------------------------------------------------------------------------
(add/remove: 2/2 grow/shrink: 4/0 up/down: 398/-729) Total: -331 bytes
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
|
This change retains "or later" state! No licensing _changes_ here,
only form is adjusted (article, space between "GPL" and "v2" and so on).
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
launch_helper 170 169 -1
setup_heredoc 312 302 -10
handle_dir_common 367 354 -13
expand_vars_to_list 2456 2443 -13
open_transformer 89 74 -15
data_extract_to_command 439 423 -16
do_ipaddr 1406 1389 -17
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/7 up/down: 0/-85) Total: -85 bytes
Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
BB_EXECVP_or_die - 47 +47
time_main 1042 1043 +1
chrt_main 371 364 -7
ionice_main 292 282 -10
setsid_main 69 56 -13
nohup_main 236 223 -13
cttyhack_main 266 253 -13
chroot_main 94 81 -13
chpst_main 746 733 -13
timeout_main 297 279 -18
taskset_main 541 522 -19
vfork_child 67 45 -22
parse 975 953 -22
lpd_main 770 748 -22
launch_helper 192 170 -22
tcpudpsvd_main 1810 1782 -28
nice_main 190 156 -34
env_main 242 206 -36
run_command 221 174 -47
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/17 up/down: 48/-352) Total: -304 bytes
Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
buffer_fill_and_print 179 196 +17
fflush_all - 9 +9
spawn 87 92 +5
rtcwake_main 455 453 -2
...
alarm_intr 93 84 -9
readcmd 1072 1062 -10
bb_ask 345 333 -12
more_main 845 832 -13
flush_stdout_stderr 42 23 -19
xfflush_stdout 27 - -27
flush_stderr 30 - -30
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 2/50 up/down: 31/-397) Total: -366 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
init: more robust signal handling
|
|
function old new delta
packed_usage 25663 25694 +31
signal_handler 191 215 +24
kill_helper 22 31 +9
launch_helper 194 184 -10
get_cred_or_die 142 129 -13
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/2 up/down: 64/-23) Total: 41 bytes
|
|
function old new delta
bb_ask - 355 +355
mkpasswd_main - 296 +296
.rodata 121746 121847 +101
packed_usage 24632 24689 +57
static.methods - 21 +21
gmatch 229 248 +19
bb_ask_stdin - 11 +11
applet_names 1949 1958 +9
applet_main 1172 1176 +4
sulogin_main 503 505 +2
applet_nameofs 586 588 +2
sha256_hash 329 327 -2
correct_password 208 206 -2
parse_command 1442 1439 -3
get_cred_or_die 145 141 -4
passwd_main 1054 1044 -10
bb_askpass 348 - -348
------------------------------------------------------------------------------
(add/remove: 4/1 grow/shrink: 7/5 up/down: 877/-369) Total: 508 bytes
|
|
|