summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * libbb: reduce the overhead of single parameter bb_error_msg() callsJames Byrne2019-07-02225-736/+845
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * ntpd: abort if argvs are (unexpectedly) givenDenys Vlasenko2019-07-021-1/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * free: include SReclaimable in cached valueLukas Rusak2019-06-251-13/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I noticed that the 'used' values from busybox free and procps-ng free differed so I looked into why. It turns out that procps-ng uses the "SReclaimable" value as part of the cached value. This was changed in procps-ng commit 05d751c4f076a2f0118b914c5e51cfbb4762ad8e function old new delta free_main 633 653 +20 Signed-off-by: Lukas Rusak <lorusak@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: deal with "declaration of 'link' shadows a global declaration" warningDenys Vlasenko2019-06-251-7/+7
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * pidof: support "pidof /path/to/binary" caseDenys Vlasenko2019-06-151-1/+5
| | | | | | | | | | | | | | function old new delta find_pid_by_name 230 227 -3 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * readlink,realpath: fix a case with a symplink, closes 11021Denys Vlasenko2019-06-131-0/+29
| | | | | | | | | | | | | | function old new delta xmalloc_realpath_coreutils 125 201 +76 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * udhcpc: fix comment, no code changesDenys Vlasenko2019-06-131-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * udhcpc6: fix aliasing warningDenys Vlasenko2019-06-111-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * dhcpc.c: Added support for relay server parameter.Martin Lewis2019-06-111-4/+9
| | | | | | | | | | | | | | | | | | | | Resolved a TODO by adding support for gateway_nip parameter. function old new delta udhcp_run_script 792 835 +43 Signed-off-by: Martin Lewis <martin.lewis.x84@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Start 1.32.0 development cycleDenys Vlasenko2019-06-101-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Bump version to 1.31.01_31_0Denys Vlasenko2019-06-101-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * mount,losetup: use /dev/loop-control is it existsDenys Vlasenko2019-06-093-10/+47
| | | | | | | | | | | | | | | | | | | | | | function old new delta get_free_loop - 58 +58 set_loop 597 649 +52 losetup_main 482 476 -6 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/1 up/down: 110/-6) Total: 104 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * start-stop-daemon: change priority before dropping privilegesAitor Esteve Alvarado2019-06-091-9/+9
| | | | | | | | | | | | | | | | | | Currently start-stop-daemon fails when using both the -c option (set uid) and -N option (set niceness/priority) as it first drops privileges and then tries to increase the priority. This patch changes the order of execution. Signed-off-by: Aitor Esteve Alvarado <aesteve@singularaircraft.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tftp: allow -lc and -cl optionsDenys Vlasenko2019-06-091-1/+9
| | | | | | | | | | | | | | function old new delta tftp_main 394 396 +2 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tftpd: revert erroneous changeDenys Vlasenko2019-06-091-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tftp: optional tftp-hpa compatDenys Vlasenko2019-06-092-3/+43
| | | | | | | | | | | | | | function old new delta tftp_main 276 394 +118 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * expand: add commented-out code to handle NULsDenys Vlasenko2019-06-091-8/+35
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * expand,unexpand: drop broken test, add FIXME commentDenys Vlasenko2019-06-083-76/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * awk: fix testsuiteDenys Vlasenko2019-06-081-0/+6
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * bc: placate compiler warningsDenys Vlasenko2019-06-081-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * vi: code shrinkDenys Vlasenko2019-06-081-2/+2
| | | | | | | | | | | | | | function old new delta colon 2852 2846 -6 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * bc: placate compiler warningsDenys Vlasenko2019-06-081-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * brctl: placate compiler warningsDenys Vlasenko2019-06-081-0/+4
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * blockdev: add usage comment, no code changesDenys Vlasenko2019-06-081-1/+11
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * httpd: .js is "application/javascript", not "application/x-javascript"Denys Vlasenko2019-06-071-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * passwd: do not set 0 as date of last password change, closes 11951Denys Vlasenko2019-06-071-1/+7
| | | | | | | | | | | | | | function old new delta update_passwd 1491 1505 +14 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * httpd: add js to built in MIME types listDenys Vlasenko2019-06-071-0/+1
| | | | | | | | | | | | Firefox needs this to execute .js Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * httpd: add svg to built in MIME types listVicente Jimenez Aguilar2019-06-071-0/+1
| | | | | | | | | | Signed-off-by: Vicente Jimenez Aguilar <googuy@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * lpd: avoid SEGVing on immediate EOF from peerDenys Vlasenko2019-06-071-2/+4
| | | | | | | | | | | | | | | | | | Patch by Luís Marques <luismarques@lowrisc.org> function old new delta lpd_main 749 757 +8 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: move netlink socket binding to the utility functionDenys Vlasenko2019-06-035-56/+55
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta create_and_bind_to_netlink - 134 +134 ifplugd_main 1117 1052 -65 uevent_main 399 306 -93 mdev_main 314 215 -99 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/3 up/down: 134/-257) Total: -123 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * mdev: add support to run as daemonJan Klötzke2019-06-031-17/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds the -d option to run mdev in daemon mode handling hotplug events from the kernel like udev. If the system generates many hotplug events this mode of operation will consume less resources than registering mdev as hotplug helper or using the uevent applet. function old new delta daemon_loop - 152 +152 initial_scan - 127 +127 open_mdev_log - 85 +85 mdev_main 255 314 +59 packed_usage 33284 33316 +32 process_action 1051 992 -59 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 2/1 up/down: 455/-59) Total: 396 bytes Signed-off-by: Jan Klötzke <jan@kloetzke.net> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * mdev: use option parser helperJan Klötzke2019-06-031-2/+9
| | | | | | | | | | | | | | | | | | | | | | function old new delta process_action - 1051 +1051 mdev_main 1324 255 -1069 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/1 up/down: 1051/-1069) Total: -18 bytes Signed-off-by: Jan Klötzke <jan@kloetzke.net> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * mdev: move action processing into separate functionsJan Klötzke2019-06-031-72/+82
| | | | | | | | | | | | | | | | This purely moves code from main() to separate functions for better extensibility. Signed-off-by: Jan Klötzke <jan@kloetzke.net> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash,hush: show 'c' in $- if run in "sh -c CMD"Denys Vlasenko2019-06-032-25/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta options 552 599 +47 expand_one_var 2375 2385 +10 optletters_optnames 60 64 +4 hush_main 1108 1111 +3 ash_main 1150 1152 +2 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 5/0 up/down: 66/0) Total: 66 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ash: allocate line editing structure only if neededDenys Vlasenko2019-06-011-37/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta optschanged 91 128 +37 historycmd 13 17 +4 setcmd 80 78 -2 ash_main 1167 1150 -17 options 576 552 -24 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/3 up/down: 41/-43) Total: -2 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * dhcp: downgrade "got raw socket fd" message to log3, make log2 default maxDenys Vlasenko2019-05-313-3/+3
| | | | | | | | | | | | | | | | | | log3 messages are very much redundant function old new delta change_listen_mode 322 302 -20 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * dhcp: get rid of static data signal_pipeDenys Vlasenko2019-05-314-23/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta udhcp_sp_setup 65 110 +45 udhcp_sp_fd_set 60 59 -1 udhcpd_main 1442 1437 -5 udhcpc_main 2684 2679 -5 signal_pipe 8 - -8 packed_usage 33292 33284 -8 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 1/4 up/down: 45/-27) Total: 18 bytes text data bss dec hex filename 952746 481 7296 960523 ea80b busybox_old 952768 481 7288 960537 ea819 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * udhcp: rename server_config to server_dataDenys Vlasenko2019-05-302-79/+79
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * losetup: Add partition scanning optionJack O'Sullivan2019-05-302-10/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | Add -P option from util-linux losetup to scan for partitions. function old new delta losetup_main 449 482 +33 packed_usage 33264 33292 +28 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 61/0) Total: 61 bytes Signed-off-by: Jack O'Sullivan <jackos1998@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | win32: allow nanosecond precision in file timesRon Yorston2019-08-162-28/+48
| | | | | | | | | | | | Modern Linux kernels use struct timespec to represent file times, thus allowing nanosecond precision. Update the WIN32 emulation of struct stat and stat(2) to do the same.
* | Update default configurationRon Yorston2019-05-272-4/+16
| |
* | Merge branch 'busybox' into mergeRon Yorston2019-05-2780-789/+1153
|\|
| * udhcp: rename client_config to client_data, server_config to server_dataDenys Vlasenko2019-05-264-188/+188
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * udhcpc6: Fixed aliasing compilation errorMartin Lewis2019-05-261-1/+1
| | | | | | | | | | Signed-off-by: Martin Lewis <martin.lewis.x84@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * shell: move all definitions of strto_arith_t() togetherDenys Vlasenko2019-05-262-11/+7
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ls: fix SEGV when --color is used and ENABLE_LS_COLOR=nDenys Vlasenko2019-05-261-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * testsuite: fix bunzip2.tests expectationsDenys Vlasenko2019-05-261-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * comment fixDenys Vlasenko2019-05-261-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libarchive: treat one "FIXME: avoid seek", take 2Denys Vlasenko2019-05-261-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * dhcp: get rid of last global dataDenys Vlasenko2019-05-263-80/+82
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta udhcpc_main 2680 2684 +4 state 1 - -1 listen_mode 1 - -1 sockfd 4 - -4 ------------------------------------------------------------------------------ (add/remove: 0/3 grow/shrink: 1/0 up/down: 4/-6) Total: -2 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>