~vcs-imports/busybox/trunk

  • Committer: Denys Vlasenko
  • Author(s): Ron Yorston
  • Date: 2024-09-27 17:39:28 UTC
  • Revision ID: git-v1:2c232f1e60fc42230c4e14bc7c548ac0e6593173
libbb: use full_write1_str() to shrink busybox_main()

There are two calls to dup2() in busybox_main().  These were
introduced to coerce full_write2_str() into writing to stdout.

The relevant commits were: 21278dff7 (busybox: do not print help
to fd 2, print it to fd 1) and 5a7c72015 (busybox --list option.
+140 bytes. Rob wanted it.)

Later, in commit 729ecb87b (bbconfig: make it independent from
printf functions), the function full_write1_str() was added.

Using this in busybox_main() allows us to drop the dup2() calls.

function                                             old     new   delta
run_applet_and_exit                                  796     760     -36
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-36)             Total: -36 bytes

Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Filename Latest Rev Last Changed Committer Comment Size
..
libarchive 11925 14 years ago Denys Vlasenko rename archival/libunarchive -> archival/libarchiv Diff
ar.c 17226 3 years ago Denys Vlasenko libbb: eliminate a static data array in bb_mode_st 8.4 KB Diff Download File
bbunzip.c 17700 1 year ago Denys Vlasenko Update applet size estimates Signed-off-by: Denys 18.7 KB Diff Download File
bbunzip_test.sh 8029 17 years ago Denis Vlasenko add tests for gunzip 1.5 KB Diff Download File
bbunzip_test2.sh 8029 17 years ago Denis Vlasenko add tests for gunzip 296 bytes Diff Download File
bbunzip_test3.sh 8029 17 years ago Denis Vlasenko add tests for gunzip 769 bytes Diff Download File
bzip2.c 16994 3 years ago Denys Vlasenko *: --help tweaks function 7.2 KB Diff Download File
chksum_and_xwrite_tar_header.c 17172 3 years ago Denys Vlasenko tar,smemcap: silence compiler warning gcc 11.2.1 1.1 KB Diff Download File
Config.src 15495 6 years ago Denys Vlasenko restore documentation on the build config language 864 bytes Diff Download File
cpio.c 17603 1 year ago Denys Vlasenko cpio: tweak --help Signed-off-by: Denys Vlasenko 17.7 KB Diff Download File
dpkg.c 17499 2 years ago Denys Vlasenko *: style fix Signed-off-by: Denys Vlasenko <vda.l 60.4 KB Diff Download File
dpkg_deb.c 17700 1 year ago Denys Vlasenko Update applet size estimates Signed-off-by: Denys 4.1 KB Diff Download File
gzip.c 16994 3 years ago Denys Vlasenko *: --help tweaks function 71.2 KB Diff Download File
Kbuild.src 13750 9 years ago Denys Vlasenko cpio: implement -R/--owner Implement -R/--owner t 196 bytes Diff Download File
lzop.c 17700 1 year ago Denys Vlasenko Update applet size estimates Signed-off-by: Denys 30.2 KB Diff Download File
rpm.c 16683 4 years ago Denys Vlasenko libbb: add and use infrastructure for fixed page s 15.9 KB Diff Download File
rpm.h 11635 14 years ago Denys Vlasenko *: make GNU licensing statement forms more regular 1 KB Diff Download File
tar.c 17660 1 year ago Denys Vlasenko libbb: code shrink: introduce and use [_]exit_FAIL 41.6 KB Diff Download File
File tar_symlink_attack 14799 7 years ago Denys Vlasenko tar: postpone creation of symlinks with "suspiciou 386 bytes Diff Download File
unzip.c 17552 1 year ago Denys Vlasenko unzip: document some options we might support Sig 31.6 KB Diff Download File