aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-03-02runsvdir: if pid==1, also intercept SIGINT for -s SCRIPTDenys Vlasenko
function old new delta runsvdir_main 1057 1064 +7 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-03-02runsvdir: do not block SIGCHLD around poll/sleepDenys Vlasenko
There is no reason to do so. We do not even have SIGCHLD handler. function old new delta runsvdir_main 1077 1057 -20 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-03-02runsvdir: (almost) close a signal raceDenys Vlasenko
We could lose a signal while processing previous one function old new delta runsvdir_main 1088 1077 -11 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-02-23acpid: fix loggingSerj Kalichev
Without this patch acpid can't log the events at all. Moreover it tries to truncate log file every time. Signed-off-by: Serj Kalichev <serj.kalichev@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-02-23ls: heed compiler warningDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-02-21modinfo: fix fallout from basename removalDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-02-19libpwdgrp: fix thinko in getpwnamTito Ragusa
function old new delta parse_file - 64 +64 getXXnam_r 162 138 -24 getXXnam 90 50 -40 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/2 up/down: 64/-64) Total: 0 bytes Signed-off-by: Tito Ragusa <farmatito@tiscali.it> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-02-18wget: fix --header to not append duplicate headersBernhard Reutner-Fischer
function old new delta wget_main 2551 2715 +164 wget_user_headers - 62 +62 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/0 up/down: 226/0) Total: 226 bytes Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-02-18trivial code shrinkDenys Vlasenko
function old new delta rdate_main 246 251 +5 show_entry 291 287 -4 daytime_stream 44 39 -5 packed_usage 30176 30168 -8 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/3 up/down: 5/-17) Total: -12 bytes text data bss dec hex filename 929453 932 17684 948069 e7765 busybox_old 929411 932 17684 948027 e773b busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-02-18ls: trivial code shrinkDenys Vlasenko
function old new delta display_single 914 893 -21 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-02-16dc: tweak parsingBernhard Reutner-Fischer
https://bugs.debian.org/538685 dc requires whitespace between language elements. We were requiring 1 2 + p instead of the abbreviated 1 2+p (for example). function old new delta stack_machine 97 126 +29 dc_main 117 79 -38 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 29/-38) Total: -9 bytes Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-02-16ls: fix year 9999 bug :)Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-02-13modprobe-small: fix thinko in previous commitDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-02-12modprobe-small: if concurrent module load did not succeed, waitDenys Vlasenko
usecase: two sd cards are being mounted in parallel at same time on dual core. example modules which are getting loaded is nls_cp437. While one module is being loaded , it makes state in /proc/modules as 'coming' and then starts doing its module init function (in our case - registering nls). meanwhile on other core, if modprobe returns that is has already been loaded, then it will continue and search for the nls list which is not yet finished from first module init. This fails resulting in not mounting sd card. function old new delta process_module 667 746 +79 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-02-10i2cget, i2cset, i2cdetect, i2cdump: new appletsBartosz Golaszewski
Add a minimal implementation of i2cget, i2cset, i2cdump and i2cdetect tools. Supports most features of upstream i2c-tools. function old new delta i2cdump_main - 1444 +1444 i2cset_main - 1239 +1239 i2cdetect_main - 611 +611 list_i2c_busses_and_exit - 532 +532 packed_usage 29975 30438 +463 i2cget_main - 380 +380 check_read_funcs - 140 +140 i2c_funcs_tab - 128 +128 confirm_action - 100 +100 i2c_dev_open - 57 +57 i2c_smbus_access - 44 +44 confirm_or_abort - 43 +43 check_funcs_test_end - 39 +39 i2c_smbus_read_word_data - 38 +38 i2c_smbus_read_byte_data - 38 +38 i2c_smbus_read_byte - 37 +37 i2c_set_slave_addr - 32 +32 applet_names 2480 2512 +32 adap_descs - 32 +32 i2c_set_pec - 29 +29 get_funcs_matrix - 21 +21 i2c_parse_data_addr - 18 +18 i2c_parse_bus_addr - 18 +18 i2c_bus_lookup - 18 +18 i2c_smbus_write_byte - 17 +17 applet_main 1440 1456 +16 will_skip - 14 +14 no_support - 11 +11 applet_nameofs 720 728 +8 applet_install_loc 180 182 +2 ------------------------------------------------------------------------------ (add/remove: 26/0 grow/shrink: 5/0 up/down: 5601/0) Total: 5601 bytes Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-02-10unzip: prevent attacks via malicious filenamesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-02-07libpwdgrp: use getpwent() instead of getpwent_r()Denys Vlasenko
function old new delta massage_data_for_non_r_func - 90 +90 bb_internal_getpwent - 69 +69 getXXnam_r 94 162 +68 fill_bounds 131 128 -3 deluser_main 355 310 -45 complete_username 123 78 -45 getXXnam 163 90 -73 massage_data_for_r_func 103 - -103 bb_internal_getpwent_r 121 - -121 ------------------------------------------------------------------------------ (add/remove: 2/2 grow/shrink: 1/5 up/down: 227/-407) Total: -163 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-02-07modprobe-small: fix and simplify rmmodDenys Vlasenko
"rmmod OUT_OF_TREE_MODULE" was not working, because module is not in depmod file. In general, rmmod doesn't need scanning, it simply unloads every argv[i]. function old new delta rmmod - 63 +63 modprobe_main 449 465 +16 process_module 705 667 -38 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/1 up/down: 79/-38) Total: 41 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-02-07libbb/loop: don't try to re-use existing loop deviceKevin Wallace
loopinfo.lo_file_name is not enough to uniquely identify a file on a system with multiple mount namespaces. We could conceivably change this to dedup on (lo_rdevice, lo_inode), but, as the comment above the deleted code notes, this whole approach of reusing devices is racy anyway, so it seems better to stop doing it entirely. Signed-off-by: Kevin Wallace <k@igneous.io> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-02-07examples/mdev_fat.conf: document that newer mdev exposes pathDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-02-07dd: add optional support for status=noxfer/noneAri Sundholm
While at it, added 'B' number suffixes, upstream compat function old new delta dd_main 1469 1543 +74 dd_suffixes 88 112 +24 packed_usage 30156 30176 +20 dd_output_status 372 388 +16 static.status_words - 13 +13 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 4/0 up/down: 147/0) Total: 147 bytes Signed-off-by: Ari Sundholm <ari@tuxera.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-02-05ash: fix a SEGV case in an invalid heredocDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-02-05deluser: implement --remove-homeDenys Vlasenko
function old new delta deluser_main 308 355 +47 packed_usage 30149 30156 +7 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 54/0) Total: 54 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-02-04fstrim: fix help textDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-02-04route: fix bogus read error when route table is emptyDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-02-03route: improve -A inet6Denys Vlasenko
Upstream route command shows non-up routes, it shows reject and nonexthop flags. And we had "ref" and "use" values mixed up... function old new delta flagvals 32 44 +12 flagchars 9 12 +3 INET_setroute 767 768 +1 INET6_setroute 495 496 +1 set_flags 43 39 -4 flags_ipvx 16 8 -8 route_main 632 623 -9 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/3 up/down: 17/-21) Total: -4 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-02-03gzip: trivial code shrink -5 bytesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-02-03ifconfig: fix double free fatal error in INET_sprintDenys Vlasenko
Based on the patch by Zheng Junling <zhengjunling@huawei.com> and Chen Gang <cg.chen@huawei.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-02-03libbb: make INET[6]_rresolve use sockaddr2{host,dotted}_noportDenys Vlasenko
function old new delta INET_rresolve 274 214 -60 INET6_rresolve 168 85 -83 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-02-02gzip: speed up and shrink put_16bit()Denys Vlasenko
function old new delta put_16bit 104 98 -6 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-02-02gzip: do not store timestamp in gzip headerRich Felker
Storing the original file's modification time in the output file is harmful (precludes deterministic results) and unlike official gzip, the busybox version provides no way to suppress this behavior; the -n option is silently ignored. Rather than trying to make -n work, this patch just removes the timestamp-storing functionality. It should be considered deprecated anyway; it's not Y2038-safe and gunzip ignores it by default. Per RFC 1952, 0 is the correct value to store to indicate that there is no timestamp. Signed-off-by: Rich Felker <dalias@libc.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-02-02platform.h: enable mempcpy for FreeBSDDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-30ubiattach: add option -OMicke Prag
Some images do not have the default VID offset. The option -O must be used to attach such images. Signed-off-by: Micke Prag <micke.prag@telldus.se> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-30telnetd: we only need CONFIG_UNIX98_PTYS from the Linux kernelMartin Kaiser
(re-sending this as it got ignored completey and the format of the previous mail was probably not correct - please let me know if there's anything else I can do to get this trivial fix applied) for telnetd to work, we only need CONFIG_UNIX98_PTYS to be enabled in the Linux kernel - DEVPTS_FS has been obsolete for some time Signed-off-by: Martin Kaiser <lists@kaiser.cx> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-30dpkg: update supported compression methodsDenys Vlasenko
Based on a patch by Ron Yorston <rmy@tigress.co.uk> function old new delta get_header_tar_xz - 60 +60 filter_accept_list_reassign 128 188 +60 unpack_package 585 621 +36 init_archive_deb_control 52 76 +24 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 3/0 up/down: 180/0) Total: 180 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-29platform.h: mempcpy needs <string.h>Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-29ntpd: get rid of G.initial_poll_completeDenys Vlasenko
This speeds up syncing - now happens only just two replies from a peer. Especially useful for "ntpd -q". Shouldn't have ill effects: if we chose a bad peer, we will discover it later and switch to another one. The code is even smaller this way. Suggested by Miroslav Lichvar <mlichvar@redhat.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-27dhcpd: fix an improper widening conversionDenys Vlasenko
We wanted to detect when tv_sec = unsigned1 - unsigned2 underflows by looking at tv_sec's sign. But if tv_sec is long and it is wider than unsigned, we get unsigned -> long conversion which is in this case never negative. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-26ftpd: prevent zombies. closes 7832Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-25platform.h: add compat mempcpyDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-24depmod: simple memory optimizationDenys Vlasenko
function old new delta filename2modname 67 86 +19 parse_module 374 351 -23 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-24trim extra newlines in help textsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-19modprobe: fix modprobe -r and parsing of /etc/modprobe.dNatanael Copa
This fixes a regression introduced with commit 78854520 (modprobe: revert checking for /, stop doing basename() on modprobe args, 2015-01-01) that broke modprobe options stored in /etc/modprobe.conf and /etc/modprobe.d/*.conf. This also fixes modprobe -r Signed-off-by: Natanael Copa <ncopa@alpinelinux.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-15modprobe: fix "modprobe devname:snd/timer" case (alias with a slash)Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-15modprobe: fix recent breakage: modules.dep reading code needs to strip dirnameDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-11modprobe-small: code shrinkDenys Vlasenko
function old new delta pathname_matches_modname 80 42 -38 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-11modprobe-small: fix recent breakage: modprobe -r was using full pathDenys Vlasenko
"modprobe -r MODNAME", after it found the full module pathname, should strip dirpath before trying to remove the module. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-11diff: fix a bug in diffing against stdin. Closes 7784Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-07vi: fix reading of file after last lineRon Yorston
If the :r command is used to read a file after the last line of the buffer the last line of the buffer and the first line of the file are joined. An extra blank line appears at the end of the buffer. file 1 file 1 file 1file 2 file 2 file 2 ~ ~ The insertion point is normally at the start of the line following the specified line. When the specified line is the last one the next_line function baulks at moving to the non-existent following line. Signed-off-by: Ron Yorston <rmy@tigress.co.uk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-07vi: failure to open file is not an error when initialising bufferRon Yorston
Commit 32afd3a introduced these regressions on the master branch: Starting vi with no filename on the command line gives the status message "'(null)' Bad address" instead of "- No file 1/1 100%". Starting vi with a non-existent file on the command line gives the status message "'new.txt' No such file or directory" instead of "- new.txt 1/1 100%" Signed-off-by: Ron Yorston <rmy@tigress.co.uk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>