~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
..
Config.src 17293 3 years ago Denys Vlasenko config system: move some options closer to releval 199 bytes Diff Download File
Kbuild.src 12359 13 years ago Denys Vlasenko reformime: do not require \r\n function 173 bytes Diff Download File
mail.c 16775 4 years ago Denys Vlasenko Fix mail compilation on the FreeBSD FreeBSD using 4.2 KB Diff Download File
mail.h 16706 4 years ago Denys Vlasenko mail: commonalize send_r_n() function 937 bytes Diff Download File
makemime.c 17700 1 year ago Denys Vlasenko Update applet size estimates Signed-off-by: Denys 8.3 KB Diff Download File
popmaildir.c 17700 1 year ago Denys Vlasenko Update applet size estimates Signed-off-by: Denys 8.5 KB Diff Download File
reformime.c 17700 1 year ago Denys Vlasenko Update applet size estimates Signed-off-by: Denys 7.6 KB Diff Download File
sendmail.c 16706 4 years ago Denys Vlasenko mail: commonalize send_r_n() function 16.1 KB Diff Download File