aboutsummaryrefslogtreecommitdiff
path: root/coreutils (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Apply post-1.24.0 patches, bump version to 1.24.11_24_1Denys Vlasenko2015-10-241-5/+15
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* build system: -fno-builtin-printfDenys Vlasenko2015-10-072-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Benefits are: drops reference to out-of-line putchar(), fixes a few cases of failed string merge. function old new delta i2cdump_main 1488 1502 +14 sha256_process_block64 423 433 +10 sendmail_main 1183 1185 +2 list_table 1114 1116 +2 i2cdetect_main 1235 1237 +2 fdisk_main 2852 2854 +2 builtin_type 119 121 +2 unicode_conv_to_printable2 325 324 -1 scan_recursive 380 378 -2 mkfs_minix_main 2687 2684 -3 buffer_fill_and_print 178 169 -9 putchar 152 - -152 ------------------------------------------------------------------------------ (add/remove: 0/2 grow/shrink: 7/4 up/down: 34/-167) Total: -133 bytes text data bss dec hex filename 937788 932 17676 956396 e97ec busybox_old 937564 932 17676 956172 e970c busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: more compact API for bb_parse_mode()Denys Vlasenko2015-10-074-6/+8
| | | | | | | | | | | | | | | | | function old new delta make_device 2182 2188 +6 parse_command 1440 1443 +3 parse_params 1497 1499 +2 install_main 773 769 -4 mkdir_main 168 160 -8 getoptscmd 641 632 -9 builtin_umask 158 147 -11 bb_parse_mode 431 410 -21 umaskcmd 286 258 -28 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/6 up/down: 11/-81) Total: -70 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* uudecode: tolerate text input with CR+LF line endsDenys Vlasenko2015-10-051-1/+12
| | | | | | | | function old new delta read_stduu 265 308 +43 uudecode_main 313 317 +4 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sort: fix -kN,M handling (was including last separator into the comparison)Denys Vlasenko2015-09-191-4/+8
| | | | | | | | | | Testcase: $ printf '%s\n' a/a:a a:b | sort -t: -k1,1 a:b a/a:a Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* uname: make OS name configurableRon Yorston2015-08-032-2/+10
| | | | | | | | | | | A mailing list thread in September 2013 discussed changing the string returned by the non-POSIX 'uname -o' option. Nothing ever came of this because there was no agreement as to what the string should be. Make the string configurable so that people can decide for themselves. Signed-off-by: Ron Yorston <rmy@frippery.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* echo: make escape sequences depend on fancy modeMike Frysinger2015-07-311-1/+1
| | | | | | | | | | | | | | | | | | | Currently when you disable fancy echo, escape sequences are hardcoded enabled (e.g. as if you used `echo -e` all the time). The opposite behavior is more desirable (always disable -e support) because: * This seems to contradict the spirit of the kconfig help text (where it says enable support for -n/-e flags), although you could say that we aren't supporting the -e flag directly as `echo -e` will show the -e flag. * POSIX makes escape sequences optional, and even says they are there only on XSI-conformant systems. * It saves space (~100 bytes on x86_64). * It makes things faster! * It makes it behave more like bash where you need an explicit -e flag in order for escape sequences to be interpreted. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sync: add support for -d -f FILEDenys Vlasenko2015-07-213-10/+75
| | | | | | | | | | | | Based on the patch by Ari Sundholm <ari@tuxera.com> function old new delta sync_main 20 163 +143 packed_usage 30653 30673 +20 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 163/0) Total: 163 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Removes stray empty line from codeManinder Singh2015-07-131-1/+0
| | | | | | | | | This patch removes stray empty line from busybox code reported by script find_stray_empty_lines Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Signed-off-by: Akhilesh Kumar <akhilesh.k@samsung.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fix whitespacesManinder Singh2015-06-071-1/+1
| | | | | | | reported by script :- scripts/fix_ws.sh Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* chown: fix help textJunling Zheng2015-06-071-1/+1
| | | | | Signed-off-by: Junling Zheng <zhengjunling@huawei.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* truncate: do not die when a file doesn't exist and no-create flag is onAri Sundholm2015-05-251-5/+15
| | | | | | | | | | | Additionally, open(2) failures do not make the program die immediately. This makes the behavior of the program match coreutils more closely. function old new delta truncate_main 161 221 +60 Signed-off-by: Ari Sundholm <ari@tuxera.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* typo fixesManinder Singh2015-05-253-3/+3
| | | | | Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* special-case {true,false,test} --helpDenys Vlasenko2015-04-213-18/+9
| | | | | | | | | | This also removes their help texts. function old new delta run_applet_no_and_exit 442 452 +10 packed_usage 30713 30625 -88 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: Switch to POSIX utmpx APIBernhard Reutner-Fischer2015-04-021-4/+4
| | | | | | | | | | UTMP is SVID legacy, UTMPX is mandated by POSIX. Glibc and uClibc have identical layout of UTMP and UTMPX, both of these libc treat _PATH_UTMPX as _PATH_UTMP so from a user-perspective nothing changes except the names of the API entrypoints. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* truncate: new appletDenys Vlasenko2015-03-221-0/+77
| | | | | | Add the actual new source file :( Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* dd: move suffix struct to xatonum.cAri Sundholm2015-03-221-25/+6
| | | | | | | This way it can be used by other applets without duplication. Signed-off-by: Ari Sundholm <ari@tuxera.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* od: fix printing of high-bit charsRon Yorston2015-03-121-8/+6
| | | | | | | Example: echo £ | od -c Signed-off-by: Ron Yorston <rmy@tigress.co.uk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: introduce and use is_prefixed_with()Denys Vlasenko2015-03-122-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta is_prefixed_with - 18 +18 complete_username 78 77 -1 man_main 737 735 -2 fsck_device 429 427 -2 unpack_ar_archive 80 76 -4 strip_unsafe_prefix 105 101 -4 singlemount 1054 1050 -4 rtc_adjtime_is_utc 90 86 -4 resolve_mount_spec 88 84 -4 parse_one_line 1029 1025 -4 parse_conf 1460 1456 -4 may_wakeup 83 79 -4 loadkmap_main 219 215 -4 get_irqs_from_stat 103 99 -4 get_header_cpio 913 909 -4 findfs_main 79 75 -4 fbsplash_main 1230 1226 -4 load_crontab 776 771 -5 expand_vars_to_list 1151 1146 -5 date_main 881 876 -5 skip_dev_pfx 30 24 -6 make_device 2199 2193 -6 complete_cmd_dir_file 773 767 -6 run_applet_and_exit 715 708 -7 uudecode_main 321 313 -8 pwdx_main 197 189 -8 execute 568 560 -8 i2cdetect_main 1186 1176 -10 procps_scan 1242 1230 -12 procps_read_smaps 1017 1005 -12 process_module 746 734 -12 patch_main 1903 1891 -12 nfsmount 3572 3560 -12 stack_machine 126 112 -14 process_timer_stats 449 435 -14 match_fstype 111 97 -14 do_ipaddr 1344 1330 -14 open_list_and_close 359 343 -16 get_header_tar 1795 1779 -16 prepend_new_eth_table 340 323 -17 fsck_main 1811 1794 -17 find_iface_state 56 38 -18 dnsd_main 1321 1303 -18 base_device 179 158 -21 find_keyword 104 82 -22 handle_incoming_and_exit 2785 2762 -23 parse_and_put_prompt 774 746 -28 modinfo 347 317 -30 find_action 204 171 -33 update_passwd 1470 1436 -34 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/49 up/down: 18/-540) Total: -522 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: heed compiler warningDenys Vlasenko2015-02-231-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: trivial code shrinkDenys Vlasenko2015-02-181-5/+5
| | | | | | | function old new delta display_single 914 893 -21 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: fix year 9999 bug :)Denys Vlasenko2015-02-161-5/+8
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* dd: add optional support for status=noxfer/noneAri Sundholm2015-02-072-70/+111
| | | | | | | | | | | | | | | | 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>
* trim extra newlines in help textsDenys Vlasenko2015-01-241-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* install: fix help textDenys Vlasenko2014-09-241-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* install: implement -t DIRAaro Koskinen2014-09-241-15/+22
| | | | | | | | | | | | | | | Some packages want to install themselves using "-t" to specify the directory (as supported by GNU coreutils). Add support for the option for compatibility reasons. function old new delta install_longopts 76 95 +19 install_main 769 777 +8 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 27/0) Total: 27 bytes Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* df: fix -T option when ENABLE_FEATURE_HUMAN_READABLE=0Ari Sundholm2014-09-201-8/+7
| | | | | Signed-off-by: Ari Sundholm <ari@tuxera.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* df: implement -T optionAri Sundholm2014-09-171-2/+23
| | | | | | | | | | | function old new delta df_main 863 998 +135 packed_usage 29827 29861 +34 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 169/0) Total: 169 bytes Signed-off-by: Ari Sundholm <ari@tuxera.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* test: fix mishandling of "test '(' = '('" and similarDenys Vlasenko2014-07-011-34/+35
| | | | | | | function old new delta test_main 246 350 +104 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* stat: fix printing selinux context and null-dereferenceMichael Gernoth2014-06-271-2/+3
| | | | | | | | | | | | busybox stat tries to always print the selinux context, even if it is not requested which leads to a segmentation fault due to dereferencing a null-pointer. This also changes the format-string used to print the context to so it actually produces useful output. Signed-off-by: Michael Gernoth <michael@gernoth.net> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unlink: new appletIsaac Dunham2014-06-221-0/+34
| | | | | | | | | function old new delta unlink_main - 45 +45 packed_usage 29667 29686 +19 Signed-off-by: Isaac Dunham <ibid.ag@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Add conditional support for -v / --verboseDenys Vlasenko2014-05-197-10/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With FEATURE_VERBOSE off, practically no size change. With it on: function old new delta remove_file 493 556 +63 install_main 719 765 +46 bb_make_directory 383 419 +36 rmdir_main 162 191 +29 copy_file 1516 1544 +28 mv_main 502 525 +23 cmp_main 677 693 +16 bbconfig_config_bz2 5264 5279 +15 mkdir_main 158 168 +10 install_longopts 66 76 +10 rm_main 167 175 +8 nexpr 840 846 +6 scan_tree 275 280 +5 fsck_main 1807 1811 +4 ed_main 2541 2545 +4 expand_one_var 1574 1575 +1 swap_on_off_main 420 418 -2 parse_command 1443 1440 -3 redirect 1279 1274 -5 do_load 946 918 -28 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 16/4 up/down: 304/-38) Total: 266 bytes Based on the patch by Igor Živković. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* shuf: trim help textDenys Vlasenko2014-03-071-4/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* shuf: do not use strings for -i RANGE caseDenys Vlasenko2014-03-071-3/+5
| | | | | | | function old new delta shuf_main 482 496 +14 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* shuf: improve help textBartosz Golaszewski2014-03-071-3/+3
| | | | | Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* shuf: fix a segfault on 'shuf -e'Bartosz Golaszewski2014-03-071-1/+2
| | | | | Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* shuf: new appletDenys Vlasenko2014-03-051-0/+150
| | | | | | | | | | | | | | | function old new delta shuf_main - 478 +478 packed_usage 29571 29719 +148 applet_names 2460 2465 +5 applet_main 1428 1432 +4 applet_nameofs 714 716 +2 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 4/0 up/down: 637/0) Total: 637 bytes Based on the code by Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: make "ls -s DIR" show total too. Clases 4946Denys Vlasenko2014-02-271-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* catv: suppress compiler warningDenys Vlasenko2014-02-031-7/+9
| | | | | | | The warning was: warning: typedef 'BUG_const_mismatch' locally defined but not used [-Wunused-local-typedefs] Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* uname: fix up usage documentationMike Frysinger2014-01-311-4/+6
| | | | | | | The -i/-o options were missing, and the -r/-s/-v options were incorrectly labeled as "OS" instead of "kernel". Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sort: check global flags on fallback sortBartosz Golaszewski2014-01-191-2/+6
| | | | | | | | | | | Sort now performs global reverse on fallback sort if -r is set. Before only key local flags were checked. function old new delta compare_keys 712 738 +26 Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sort.c: remove a magic number from compare_keys()Bartosz Golaszewski2014-01-191-1/+1
| | | | | | | Use bitwise OR of proper flags instead. Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* tail: adjust help/usage textsCristian Ionescu-Idbohrn2014-01-102-5/+5
| | | | | Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* chown: fix help textDenys Vlasenko2014-01-091-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* expand: use printable_string instead of hard-coding implementationMichael Tokarev2013-12-161-10/+3
| | | | | | | | function old new delta expand_main 709 690 -19 Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Use unsigned printf/scanf conversion where more appropriateDenys Vlasenko2013-11-292-3/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* tail compat: fix header printing for tail -fBartosz Golaszewski2013-10-161-1/+4
| | | | | | | | Makes tail -f for multiple files display the header only if another (ie. not currently displayed) file changed. Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* touch: add conditional support for -hDenys Vlasenko2013-09-111-4/+35
| | | | | | Based on a patch by Andy <andy.padavan@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* dd: code shrinkDenys Vlasenko2013-08-201-3/+4
| | | | | | | function old new delta dd_main 1475 1469 -6 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* dd: code shrinkDenys Vlasenko2013-08-201-2/+2
| | | | | | | function old new delta dd_main 1487 1475 -12 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>