summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* hush: code shrinkDenys Vlasenko2020-12-141-1/+1
| | | | | | | | | | | | | function old new delta run_applet_main - 20 +20 builtin_kill 296 288 -8 builtin_test 19 10 -9 builtin_printf 19 10 -9 builtin_echo 19 10 -9 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/4 up/down: 20/-35) Total: -15 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* help text: replace [OPTIONS] with actual options (if not too long)Denys Vlasenko2020-12-1314-33/+17
| | | | | | | function old new delta packed_usage 33620 33665 +45 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: if login shell, also source ~/.profileDenys Vlasenko2020-12-131-8/+16
| | | | | | | function old new delta hush_main 1101 1151 +50 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* examples: remove /sbin/ prefixes, system should be configured with $PATH to ↵Denys Vlasenko2020-12-134-10/+10
| | | | | | find utilities Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* more --help text tweaksDenys Vlasenko2020-12-134-6/+5
| | | | | | | function old new delta packed_usage 33545 33581 +36 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* help text tweaksDenys Vlasenko2020-12-1310-10/+10
| | | | | | | function old new delta packed_usage 33547 33545 -2 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: NOMMU fix for hush-psubst/tick6.testsDenys Vlasenko2020-12-131-0/+7
| | | | | | | function old new delta hush_main 1759 1766 +7 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: fix -c SCRIPT handlingDenys Vlasenko2020-12-131-51/+63
| | | | | | | function old new delta hush_main 1763 1759 -4 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: reset SIGHUP earlier: allows HUP traps in .profile, closes 13371Denys Vlasenko2020-12-131-8/+11
| | | | | | | function old new delta ash_main 1188 1203 +15 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* traceroute: code shrinkDenys Vlasenko2020-12-131-10/+11
| | | | | | | | | | | function old new delta hexdump_if_verbose - 255 +255 common_traceroute_main 1668 1644 -24 hexdump 239 - -239 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 0/1 up/down: 255/-263) Total: -8 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* traceroute: even with -v, don't show other ping processes reply'sDenys Vlasenko2020-12-132-2/+21
| | | | | | | | | | | function old new delta traceroute_init 1135 1151 +16 common_ping_main 1919 1935 +16 common_traceroute_main 1715 1668 -47 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 32/-47) Total: -15 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* traceroute: simpler hexdump()Denys Vlasenko2020-12-131-9/+5
| | | | | | | function old new delta hexdump 270 239 -31 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* traceroute: make "ipv4 or ipv6?" cheaper to find outDenys Vlasenko2020-12-131-15/+21
| | | | | | | | | | | function old new delta traceroute_init 1131 1135 +4 hexdump 274 270 -4 common_traceroute_main 1730 1715 -15 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/2 up/down: 4/-19) Total: -15 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* traceroute: don't set SO_DONTROUTE on recv socket, it only affects sendDenys Vlasenko2020-12-131-3/+0
| | | | | | | function old new delta traceroute_init 1147 1131 -16 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* traceroute: untangle main loopDenys Vlasenko2020-12-121-112/+106
| | | | | | | function old new delta common_traceroute_main 1785 1730 -55 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* traceroute: commonalize verbose printingDenys Vlasenko2020-12-121-83/+62
| | | | | | | | | | | | function old new delta hexdump - 274 +274 traceroute_init 1172 1147 -25 pr_type 79 - -79 common_traceroute_main 2091 1785 -306 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 0/2 up/down: 274/-410) Total: -136 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* traceroute: set IP_PKTINFO to see correct local IP of received pkt (fixes -v ↵Denys Vlasenko2020-12-121-64/+41
| | | | | | | | | | | | | | display) Also, assorted code shrink: function old new delta traceroute_init 1210 1172 -38 common_traceroute_main 2141 2091 -50 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-88) Total: -88 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* traceroute: code shrinkDenys Vlasenko2020-12-121-30/+40
| | | | | | | | | | | | Move init code to a separate function. function old new delta traceroute_init - 1203 +1203 common_traceroute_main 3391 2141 -1250 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/1 up/down: 1203/-1250) Total: -47 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* traceroute: code shrinkDenys Vlasenko2020-12-121-49/+35
| | | | | | | | | Do not pass "from" and "to" addresses as parameters, keep them in globals function old new delta common_traceroute_main 3426 3391 -35 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* traceroute: code shrinkDenys Vlasenko2020-12-121-49/+58
| | | | | | | | | Do not byteswap ident (why we were doing it?) function old new delta common_traceroute_main 3544 3426 -118 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* traceroute: fix traceroute6 -I (icmp mode)Denys Vlasenko2020-12-121-71/+135
| | | | | | | function old new delta common_traceroute_main 3530 3544 +14 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* nsenter: stop option parsing on 1st non-optionDenys Vlasenko2020-12-122-2/+3
| | | | | | "nsenter ls -l" gives: invalid option -- 'l' Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: make msleep() result in only one syscall instead of loopingDenys Vlasenko2020-12-113-4/+21
| | | | | | | function old new delta msleep 45 52 +7 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mount: fix incorrect "success" exitcode if loop device setup failsDenys Vlasenko2020-12-091-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | When mounting, in parallel, multiple loop devices (squashfs for the submitter's case), the following behavior can be observed: stat64(/path/to/image, {st_mode=S_IFREG|0644, st_size=4096, ...}) = 0 openat(AT_FDCWD, /path/to/image, O_RDWR|O_LARGEFILE) = 3 openat(AT_FDCWD, /dev/loop-control, O_RDWR|O_LARGEFILE|O_CLOEXEC) = 4 ioctl(4, LOOP_CTL_GET_FREE) = 12 close(4) = 0 openat(AT_FDCWD, /dev/loop12, O_RDWR|O_LARGEFILE) = 4 ioctl(4, LOOP_GET_STATUS64, {lo_offset=0, lo_number=12, lo_flags=LO_FLAGS_AUTOCLEAR, lo_file_name=/path/to/image, ...}) = 0 close(4) = 0 close(3) = 0 write(2, "mount: can't setup loop device\n", 31mount: can't setup loop device ) = 31 exit_group(0) = ? +++ exited with 0 +++ The ioctl LOOP_CTL_GET_FREE has resulted in the same result for a competing mount process. The subsequent ioctl LOOP_GET_STATUS64 fails, having succeeded for the competing mount process. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* wget: do not ftruncate if -O- is used, closes 13351Denys Vlasenko2020-12-081-3/+10
| | | | | | | | | | function old new delta wget_main 2558 2571 +13 retrieve_file_data 612 621 +9 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 22/0) Total: 22 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mkdtemp: proper error detection on mktempXabier Oneca2020-12-081-1/+2
| | | | | | | On error, mktemp returns an empty string, not NULL. Signed-off-by: Xabier Oneca <xoneca@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* tar: expand --helpDenys Vlasenko2020-12-081-11/+16
| | | | | | | function old new delta packed_usage 33486 33590 +104 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mount: implement -o nosymfollow, remove bogus -o unionDenys Vlasenko2020-12-061-4/+4
| | | | | | | | | | | | The (1 << 8) MS_ flag is MS_NOSYMFOLLOW, not MS_UNION. As far as I see in git history of kernel and util-linux, MS_UNION did not ever exist. Why did it appear in our tree in 2009?... function old new delta mount_option_str 379 385 +6 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mount: add -o nostrictatime and -o [no]lazytimeDenys Vlasenko2020-12-061-24/+34
| | | | | | | | | | function old new delta mount_option_str 345 379 +34 mount_options 176 188 +12 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 46/0) Total: 46 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mount: do not guess mount as NFS if "hostname:" contains slashesDenys Vlasenko2020-12-051-7/+11
| | | | | | | function old new delta singlemount 1273 1295 +22 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* awk: add a test that $NF is emptyDenys Vlasenko2020-12-041-2/+9
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: exec_login_shell() - new functionDenys Vlasenko2020-12-024-4/+10
| | | | | | | | | | | function old new delta exec_login_shell - 12 +12 sulogin_main 247 240 -7 login_main 960 953 -7 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/2 up/down: 12/-14) Total: -2 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: code shrink in exec_shell()Denys Vlasenko2020-12-021-6/+8
| | | | | | | function old new delta exec_shell 129 120 -9 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: rename run_shell() to exec_shell()Denys Vlasenko2020-12-026-16/+16
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mount: do not guess bind mounts as nfsDenys Vlasenko2020-12-021-0/+1
| | | | | | | | | | | | Fails as follows: $ mount -o bind /dev/disk/by-path/pci-0000:13:00.0-scsi-0:0:3:0 /dir mount: bad address '/dev/disk/by-path/pci-0000' function old new delta singlemount 1256 1273 +17 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* awk: FS regex matches only non-empty separators (gawk compat)Denys Vlasenko2020-12-022-8/+32
| | | | | | | function old new delta awk_split 484 553 +69 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* login: log to syslog every bad password, not only 3rdDenys Vlasenko2020-12-021-4/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mount: make filesystems[] array byte-alignedDenys Vlasenko2020-11-301-1/+1
| | | | | | | | text data bss dec hex filename 1021120 559 5052 1026731 faaab busybox_old 1021092 559 5052 1026703 faa8f busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* decrease padding: gcc-9.3.1 slaps 32-byte alignment on arrays willy-nillyDenys Vlasenko2020-11-309-14/+14
| | | | | | | | text data bss dec hex filename 1021236 559 5052 1026847 fab1f busybox_old 1021120 559 5052 1026731 faaab busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* decrease paddign: gcc-9.3.1 slaps 32-byte alignment on arrays willy-nillyDenys Vlasenko2020-11-3051-96/+92
| | | | | | | | text data bss dec hex filename 1021988 559 5052 1027599 fae0f busybox_old 1021236 559 5052 1026847 fab1f busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unicode: relax array alignment for tablesDenys Vlasenko2020-11-301-8/+8
| | | | | | | | text data bss dec hex filename 1022075 559 5052 1027686 fae66 busybox_old 1021988 559 5052 1027599 fae0f busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unicode: fix handling of short 1-4 char tablesDenys Vlasenko2020-11-302-3/+4
| | | | | | | function old new delta in_uint16_table 92 107 +15 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: code shrinkDenys Vlasenko2020-11-291-6/+3
| | | | | | | function old new delta generate_uuid 124 103 -21 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: introduce and use msleep()Denys Vlasenko2020-11-295-6/+20
| | | | | | | | | | | | function old new delta msleep - 45 +45 watchdog_main 271 266 -5 common_traceroute_main 3546 3530 -16 beep_main 277 248 -29 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/3 up/down: 45/-50) Total: -5 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* use write_str() functions where appropriateDenys Vlasenko2020-11-292-5/+5
| | | | | | | | | | | function old new delta chat_main 1300 1295 -5 finalize_tty_attrs 80 70 -10 getty_main 1538 1519 -19 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-34) Total: -34 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: introduce and use sleep1()Denys Vlasenko2020-11-2919-29/+33
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* libbb: bb_do_delay(3) -> pause_after_failed_login(), and stop looping thereDenys Vlasenko2020-11-298-15/+26
| | | | | | | | | | | | | | | function old new delta pause_after_failed_login - 9 +9 vlock_main 358 353 -5 sulogin_main 252 247 -5 su_main 484 479 -5 passwd_main 936 931 -5 login_main 967 962 -5 bb_do_delay 68 - -68 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 0/5 up/down: 9/-93) Total: -84 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: in @SECONDS date format, use 64-bit time if libc allowsDenys Vlasenko2020-11-282-1/+6
| | | | | | | | function old new delta packed_usage 33472 33486 +14 parse_datestr 919 916 -3 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* date: tweak --help: -D FMT is used for -s TIME as wellDenys Vlasenko2020-11-281-26/+19
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* date: remove non-standard special-casing of date '+%f'Denys Vlasenko2020-11-281-4/+0
| | | | | | | | | git log did not reveal why it is there. function old new delta date_main 1016 995 -21 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>