aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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>
2015-01-07depmod: fix recent breakage in modules.dep generationDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-06libpwdgrp: line counting in error meesages is broken, remove itTito Ragusa
Signed-off-by: Tito Ragusa <farmatito@tiscali.it> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-05swaponoff: add support for -eRené Rhéaume
Signed-off-by: René Rhéaume <rene.rheaume@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-05mpstat: code shrinkDenys Vlasenko
function old new delta get_uptime 134 129 -5 get_irqs_from_stat 110 103 -7 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-05free: handle "cached" value tooGuillermo Rodriguez
function old new delta free_main 356 481 +125 Signed-off-by: Guillermo Rodriguez <guille.rodriguez@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-05libbb: code shrink by factoring out common update_utmp_DEAD_PROCESSDenys Vlasenko
function old new delta update_utmp_DEAD_PROCESS - 17 +17 telnetd_main 1685 1674 -11 mark_terminated 56 45 -11 handle_sigchld 74 63 -11 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-05deleting unused ntpd_simple.cDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-05libpwdgrp: fixes suggested by Tito, comment tweaksDenys Vlasenko
function old new delta bb_internal_getpwent_r 100 121 +21 parse_common 202 203 +1 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-04ntpd: relicense ntpd applet to ISC-style licenseAdam Tkac
OpenNTPd is licensed under ISC-style license so it's good idea to keep ntpd applet under same license to avoid mess, instead of having our changes to be under GPL. Names of original code's authors are added. Signed-off-by: Adam Tkac <vonsch@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-04libpwdgrp: another code shrinkDenys Vlasenko
function old new delta massage_data_for_r_func - 110 +110 bb_internal_getpwent_r 173 100 -73 getXXnam_r 176 95 -81 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/2 up/down: 110/-154) Total: -44 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-04libpwdgrp: code shrinkDenys Vlasenko
function old new delta parse_common 206 205 -1 getgrouplist_internal 229 225 -4 bb_internal_getpwent_r 182 173 -9 getXXnam 232 222 -10 getXXnam_r 216 176 -40 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/5 up/down: 0/-64) Total: -64 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-03libpwdgrp: getgrXXX: empty string is not a member name, do not store itDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-03fix a SEGV in previous commitDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-03libpwdgrp: fix counting of commas in group listDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-03libpwdgrp: store getXXnam result in a single malloc blockDenys Vlasenko
This saves a bit of memory but more importantly, allows to create xmalloc_getpwnam() API where result can be deleted simply using free(). function old new delta getXXnam 134 173 +39 parse_common 188 212 +24 convert_to_struct 277 290 +13 get_S 90 88 -2 tokenize 129 126 -3 bb_internal_getpwent_r 175 172 -3 getXXnam_r 208 198 -10 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/4 up/down: 76/-18) Total: 58 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-03libpwdgrp: make db->def[] one byte shorterDenys Vlasenko
In the future I will need another uint8_t, want to fit it w/o using another word on 32 bits. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-03libpwdgrp: use a better estimate of max struct sizeDenys Vlasenko
Previous code's trick with bitwise OR was giving this on 32-bit x86: sizeof(struct passwd):28 sizeof(struct group):16 sizeof(struct spwd):36 sizeof(struct_result):60 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-03libpwdgrp: reinstate Tito's optional atexit freeingDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-03libpwdgrp: fix a memory leak in getXXnam (we did not save address of string buf)Denys Vlasenko
function old new delta convert_to_struct 261 269 +8 const_sp_db 20 24 +4 const_pw_db 20 24 +4 const_gr_db 20 24 +4 tokenize 144 147 +3 parse_common 185 188 +3 get_S 82 85 +3 bb_internal_getpwent_r 188 185 -3 gr_off 4 - -4 getXXnam 171 165 -6 pw_off 7 - -7 getgrouplist_internal 237 229 -8 getXXnam_r 215 207 -8 sp_off 9 - -9 ------------------------------------------------------------------------------ (add/remove: 0/3 grow/shrink: 7/4 up/down: 29/-45) Total: -16 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-03libpwdgrp: tweak comments, replace one xmalloc with xzallocDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-02libpwdgrp: use FAST_FUNC to make "matching ABI" optimization more likely to ↵Denys Vlasenko
succeed See bb_internal_get*nam_r size reduction: function old new delta bb_internal_getpwent_r 167 176 +9 getXXnam_r 204 206 +2 sulogin_main 326 325 -1 su_main 471 470 -1 read_line_input 3832 3831 -1 print_stat 865 864 -1 prepare_socket_fd 283 282 -1 load_crontab 777 776 -1 fork_job 456 455 -1 do_shm 884 883 -1 do_sem 637 636 -1 do_msg 783 782 -1 complete_username 124 123 -1 bb_internal_getgrouplist 71 70 -1 xgetpwuid 27 25 -2 xgetpwnam 27 25 -2 xgetgrnam 27 25 -2 xgetgrgid 27 25 -2 uid2uname 18 16 -2 login_main 980 978 -2 gid2group 18 16 -2 get_shell_name 54 52 -2 change_identity 50 48 -2 bb_internal_initgroups 50 48 -2 argstr 1261 1259 -2 print_perms 177 174 -3 inetd_main 2077 2074 -3 run_applet_no_and_exit 446 442 -4 fileaction_setowngrp 89 85 -4 deluser_main 312 308 -4 bb_internal_getpwuid 19 15 -4 bb_internal_getpwnam 11 7 -4 bb_internal_getgrnam 14 10 -4 bb_internal_getgrgid 19 15 -4 adduser_main 865 861 -4 passwd_main 989 984 -5 get_passwd 97 92 -5 data_extract_all 887 882 -5 check_user_passwd 490 485 -5 get_groups 81 75 -6 ftpd_main 2178 2171 -7 bb_internal_getspnam_r 42 18 -24 bb_internal_getpwnam_r 39 15 -24 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/41 up/down: 11/-153) Total: -142 bytes text data bss dec hex filename 923167 928 17676 941771 e5ecb busybox_old 923023 928 17676 941627 e5e3b busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-02libpwdgrp: rewritten to use malloced implementationTito Ragusa
This removed buffer size limitations. function old new delta convert_to_struct - 269 +269 getXXnam_r - 204 +204 parse_common - 185 +185 getXXnam - 164 +164 tokenize - 126 +126 bb_internal_getpwent_r 102 167 +65 get_S 30 88 +58 getgrouplist_internal 195 240 +45 const_sp_db - 20 +20 const_pw_db - 20 +20 const_gr_db - 20 +20 bb_internal_endpwent 27 36 +9 bb_internal_endgrent 27 36 +9 decode_one_format 726 734 +8 bb_internal_setpwent 17 24 +7 volume_id_probe_iso9660 319 322 +3 scriptreplay_main 204 207 +3 mkfs_minix_main 2684 2687 +3 id_main 478 480 +2 hash_find 233 235 +2 pstree_main 321 322 +1 gr_off 3 4 +1 expand_one_var 1579 1578 -1 pwf 4 - -4 grf 4 - -4 pack_gzip 1787 1780 -7 addattr32 67 56 -11 buffer_fill_and_print 191 178 -13 dpkg_main 2944 2927 -17 bb_internal_setgrent 17 - -17 bb_internal_getpwuid 38 19 -19 bb_internal_getgrgid 44 19 -25 bb_internal_getpwnam 38 11 -27 bb_internal_getgrnam 44 14 -30 bb_internal_fgetpwent_r 51 - -51 bb_internal_fgetgrent_r 51 - -51 bb_internal_getspnam_r 121 42 -79 bb_internal_getpwnam_r 121 39 -82 bb_internal_getgrent_r 102 - -102 bb__parsepwent 110 - -110 bb_internal_getpwuid_r 113 - -113 bb_internal_getgrgid_r 113 - -113 bb__parsespent 120 - -120 bb_internal_getgrnam_r 121 - -121 bb__pgsreader 213 - -213 bb__parsegrent 226 - -226 ------------------------------------------------------------------------------ (add/remove: 8/13 grow/shrink: 14/11 up/down: 1224/-1556) Total: -332 bytes text data bss dec hex filename 923471 928 17684 942083 e6003 busybox_old 923167 928 17676 941771 e5ecb busybox_unstripped Signed-off-by: Tito Ragusa <farmatito@tiscali.it> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-01modprobe: revert checking for /, stop doing basename() on modprobe argsDenys Vlasenko
function old new delta process_module 726 719 -7 filename2modname 81 67 -14 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-21) Total: -21 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>