summaryrefslogtreecommitdiff
path: root/coreutils/du.c
Commit message (Collapse)AuthorAgeFilesLines
* du: document incompatibility with standard toolDenys Vlasenko2012-12-141-0/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* du: trim help text a bit moreDenys Vlasenko2012-03-051-7/+5
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* du: remove stray whitespace in help textDenys Vlasenko2012-03-051-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* du: use long long for size fieldIan Wienand2012-02-281-5/+5
| | | | | | | | | | | | | | | | du has issues with files reporting large block counts on 32-bit systems with 4 byte longs. From looking at the stat.c code, it seems the preference is to use 'long long', rather than blkcnt_t. function old new delta du 420 444 +24 du_main 317 321 +4 print 43 41 -2 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 28/-2) Total: 26 bytes Signed-off-by: Ian Wienand <ianw@vmware.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* add INIT_G()'s. No code changes.Denys Vlasenko2011-09-211-0/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: remove "Options:" string from help textsDenys Vlasenko2011-06-051-1/+0
| | | | | | | function old new delta packed_usage 28706 28623 -83 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* move help text from include/usage.src.h to coreutils/*.cPere Orga2011-03-311-0/+37
| | | | | Signed-off-by: Pere Orga <gotrunks@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: make GNU licensing statement forms more regularDenys Vlasenko2010-08-161-1/+1
| | | | | | | This change retains "or later" state! No licensing _changes_ here, only form is adjusted (article, space between "GPL" and "v2" and so on). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: suppress ~60% of "aliased warnings" on gcc-4.4.1Denys Vlasenko2010-02-041-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb/human_readable.c: shrink; and reduce bss usageDenys Vlasenko2009-10-131-2/+5
| | | | | | | | | | | | | | | | | | | | also, move smart_ulltoaN there and comment usage locations function old new delta static.unit_chars 7 9 +2 utoa_to_buf 110 108 -2 make_human_readable_str 262 258 -4 fallbackSort 1723 1719 -4 static.fmt 97 92 -5 static.fmt_tenths 10 - -10 static.str 21 4 -17 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 1/5 up/down: 2/-42) Total: -40 bytes text data bss dec hex filename 820981 453 6932 828366 ca3ce busybox_old 820968 453 6916 828337 ca3b1 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: mass renaming of USE_XXXX to IF_XXXXDenis Vlasenko2009-04-211-4/+4
| | | | | | and SKIP_XXXX to IF_NOT_XXXX - the second one was especially badly named. It was not skipping anything!
* du: fix "du /dir /dir" caseDenis Vlasenko2008-11-111-47/+35
| | | | | | | | | reset_ino_dev_hashtable - 84 +84 du 388 376 -12 du_main 327 301 -26 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/2 up/down: 84/-38) Total: 46 bytes
* *: rename ATTRIBUTE_XXX to just XXX.Denis Vlasenko2008-07-051-1/+1
|
* *: shrink: use Vladimir's "o+" specifier instead of xatou(opt_param)Denis Vlasenko2008-03-171-9/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta getopt32 1370 1385 +15 sulogin_main 490 494 +4 realpath_main 84 86 +2 sleep_main 76 77 +1 mt_main 256 257 +1 printenv_main 75 74 -1 fdformat_main 546 545 -1 usleep_main 44 42 -2 setlogcons_main 77 75 -2 ed_main 2654 2649 -5 deallocvt_main 69 64 -5 addgroup_main 373 368 -5 mkfs_minix_main 2989 2982 -7 tail_main 1221 1213 -8 sv_main 1254 1241 -13 du_main 348 328 -20 tftp_main 325 302 -23 split_main 581 558 -23 nc_main 1000 977 -23 diff_main 891 868 -23 arping_main 1797 1770 -27 ls_main 893 847 -46 od_main 2797 2750 -47 readprofile_main 1944 1895 -49 tcpudpsvd_main 1973 1922 -51 udhcpc_main 2590 2513 -77 grep_main 824 722 -102 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 5/22 up/down: 23/-560) Total: -537 bytes text data bss dec hex filename 796973 658 7428 805059 c48c3 busybox_old 796479 662 7420 804561 c46d1 busybox_unstripped
* *: add -Wunused-parameter; fix resulting breakageDenis Vlasenko2008-03-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta procps_scan 1265 1298 +33 aliascmd 278 283 +5 parse_file_cmd 116 120 +4 dname_enc 373 377 +4 setcmd 90 93 +3 execcmd 57 60 +3 count_lines 72 74 +2 process_command_subs 340 339 -1 test_main 409 407 -2 mknod_main 179 177 -2 handle_incoming_and_exit 2653 2651 -2 argstr 1312 1310 -2 shiftcmd 131 128 -3 exitcmd 46 43 -3 dotcmd 297 294 -3 breakcmd 86 83 -3 evalpipe 353 349 -4 evalcommand 1180 1176 -4 evalcmd 109 105 -4 send_tree 374 369 -5 mkfifo_main 82 77 -5 evalsubshell 152 147 -5 typecmd 75 69 -6 letcmd 61 55 -6 add_cmd 1190 1183 -7 main 891 883 -8 ash_main 1415 1407 -8 parse_stream 1377 1367 -10 alloc_procps_scan 55 - -55 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 7/21 up/down: 54/-148) Total: -94 bytes text data bss dec hex filename 797195 658 7428 805281 c49a1 busybox_old 797101 658 7428 805187 c4943 busybox_unstripped
* add -fvisibility=hidden to CC flags, mark XXX_main functionsDenis Vlasenko2007-10-111-1/+1
| | | | | EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
* 'simple' error message functions by Loic Grenie <loic.grenie@gmail.com>.Denis Vlasenko2007-10-011-2/+2
| | | | | 263 bytes saved.
* du: remove statics (by Bernhard Fischer <rep.dot.nop@gmail.com>)Denis Vlasenko2007-09-031-64/+64
| | | | | | | | | | | | | | | | | | | | | | | | | $ ./.cmk bloatcheck function old new delta du_main 340 348 +8 print 39 40 +1 status 129 125 -4 slink_depth 4 - -4 print_files 4 - -4 one_file_system 4 - -4 max_print_depth 4 - -4 du_depth 4 - -4 disp_hr 4 - -4 count_hardlinks 4 - -4 du 407 401 -6 dir_dev 8 - -8 ------------------------------------------------------------------------------ (add/remove: 0/8 grow/shrink: 2/2 up/down: 9/-46) Total: -37 bytes text data bss dec hex filename 864 12 28 904 388 busybox.t3/coreutils/du.o 867 0 0 867 363 busybox.t4/coreutils/du.o 770647 1063 10788 782498 bf0a2 busybox.t3/busybox_unstripped 770651 1051 10764 782466 bf082 busybox.t4/busybox_unstripped
* don't pass argc in getopt32, it's superfluousDenis Vlasenko2007-08-181-2/+2
| | | | | | | | (add/remove: 0/0 grow/shrink: 12/131 up/down: 91/-727) Total: -636 bytes text data bss dec hex filename 773469 1058 11092 785619 bfcd3 busybox_old 772644 1058 11092 784794 bf99a busybox_unstripped
* trylink: produce even more info about final link stageDenis Vlasenko2007-08-121-2/+2
| | | | | | | | | trylink: explain how to modify link and drastically decrease amount of padding (unfortunately, needs hand editing ATM). *: add ALIGN1 / ALIGN2 to global strings and arrays of bytes and shorts size saving: 0.5k
* usage.c: remove reference to busybox.hDenis Vlasenko2007-05-261-1/+1
| | | | | *: s/include "busybox.h"/include "libbb.h"
* - fix segfault in reset_ino_dev_hashtable() when *hashtable was null.Bernhard Reutner-Fischer2007-04-051-4/+2
| | | | Seen in the testsuite for du -l .../testsuite on exit with CLEAN_UP enabled.
* missed hunk of "stop using big static buffer for inode hash"Denis Vlasenko2007-03-141-1/+1
|
* suppress warnings about easch <applet>_main() havingDenis Vlasenko2007-02-031-0/+1
| | | | no preceding prototype
* preparatory patch for -Wwrite-strings #1Denis Vlasenko2007-01-291-1/+1
|
* du: dietlibc compat fix, style fixes. Thanks to sampo@symlabs.com.Denis Vlasenko2006-12-181-35/+31
|
* reshuffle libbb.h contents so that order of decls makes senseDenis Vlasenko2006-10-271-3/+3
| | | | Found bad typo in largefile support :)
* remove bb_printf and the likeDenis Vlasenko2006-10-261-3/+3
|
* message string changes, mostly for consistency, also -32 bytes in .rodataDenis Vlasenko2006-10-201-1/+1
|
* attempt to regularize atoi mess.Denis Vlasenko2006-10-081-1/+1
|
* getopt_ulflags -> getopt32.Denis Vlasenko2006-10-031-5/+5
| | | | | | | | It is impossible to formulate sane ABI based on size of ulong because it can be 32-bit or 64-bit. Basically it means that you cannot portably use more that 32 option chars in one call anyway... Make it explicit.
* - pull from busybox_scratch: r15829:15850Bernhard Reutner-Fischer2006-08-281-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Various fixes, cleanups and shrinkage: saves 952 Bytes: text data bss dec hex filename 1087742 15853 790632 1894227 1ce753 ../busybox/busybox.old 1086790 15853 790632 1893275 1ce39b busybox via: # scripts/bloat-o-meter ../busybox/busybox_unstripped.old busybox_unstripped function old new delta ipcrm_main 756 822 +66 getval - 61 +61 maybe_set_utc - 40 +40 udhcpc_main 2896 2912 +16 md5_hash_block 428 437 +9 opt 8 16 +8 qgravechar 106 110 +4 make_bitmap 292 295 +3 inflate_unzip 2056 2059 +3 add_partition 1412 1414 +2 __parsespent 156 158 +2 qrealloc 41 42 +1 format - 1 +1 catv_main 313 314 +1 watch_main 293 292 -1 varunset 81 80 -1 part 1 - -1 check_if_skip 837 836 -1 start_stop_daemon_main 840 837 -3 create_lost_and_found 175 172 -3 supress_non_delimited_lines 4 - -4 static.l 4 - -4 static.c 5 1 -4 bsd_sum_file 237 233 -4 eval2 338 332 -6 arithmetic_common 166 158 -8 cmpfunc 22 5 -17 cksum_main 294 275 -19 cmp_main 465 439 -26 dd_main 1535 1508 -27 rmmod_main 376 333 -43 cut_file 727 644 -83 ipcs_main 3809 3721 -88 cut_main 722 614 -108 date_main 1443 1263 -180 remove_ids 222 - -222 ------------------------------------------------------------------------------ (add/remove: 3/4 grow/shrink: 11/18 up/down: 217/-853) Total: -636 bytes
* These should have been part of 15767 too.Rob Landley2006-08-031-1/+1
|
* Convert a chunk of usage.h to USE_ and SKIP_ (more to do there), and fix aRob Landley2006-04-251-4/+4
| | | | DEFALT typo in du while I was there.
* - add and use bb_opendir(), bb_xopendir().Bernhard Reutner-Fischer2006-04-121-16/+2
| | | | | | | | text data bss dec hex filename 889445 9392 1035784 1934621 1d851d busybox.gcc-4.2.orig 889297 9392 1035784 1934473 1d8489 busybox.gcc-4.2 889009 9820 1037860 1936689 1d8d31 busybox.gcc-4.1.orig 888817 9820 1037860 1936497 1d8c71 busybox.gcc-4.1
* avoid signed<->unsigned warning"Vladimir N. Oleynik"2006-01-311-1/+1
|
* 1) bb_opt_complementaly -> bb_opt_complementally"Vladimir N. Oleynik"2005-09-051-2/+2
| | | | | 2) better support long options 3) new flag '!' for bb_opt_complementally: produce bb_show_usage() if BB_GETOPT_ERROR internally
* Remove trailing whitespace. Update copyright to include 2004.Eric Andersen2004-03-151-1/+1
|
* When displaying the size in 1kB blocks round up if an odd number ofGlenn L McGrath2004-03-101-1/+5
| | | | blocks
* Patch by Seth W. Klein, the -l switch was reversedGlenn L McGrath2004-03-101-2/+2
|
* last_patch89 from vodz:Eric Andersen2003-06-201-45/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Manuel, I rewrite bb_getopt_ulflags() function for more universal usage. My version support now: - options with arguments (optional arg as GNU extension also) - complementaly and/or incomplementaly and/or incongruously and/or list options - long_opt (all applets may have long option, add supporting is trivial) This realisation full compatibile from your version. Code size grow 480 bytes, but only coreutils/* over compensate this size after using new function. Last patch reduced over 800 bytes and not full applied to all. "mkdir" and "mv" applets have long_opt now for demonstrate trivial addition support long_opt with usage new bb_getopt_ulflags(). Complementaly and/or incomplementaly and/or incongruously and/or list options logic is not trivial, but new "cut" and "grep" applets using this logic for examples with full demostrating. New "grep" applet reduced over 300 bytes. Mark, Also. I removed bug from "grep" applet. $ echo a b | busybox grep -e a b a b a b But right is printing one only. --w vodz
* Vodz, last_patch_86Glenn L McGrath2003-05-261-3/+2
|
* Major coreutils update.Manuel Novoa III2003-03-191-80/+147
|
* move some globals to bssAaron Lehmann2002-08-231-4/+4
|
* Run through indentGlenn L McGrath2002-08-231-30/+32
|
* Patch from Edward Betts <edward@debian.org> to add -x switch to du.cEric Andersen2002-04-061-2/+12
|
* Make cp and mv optionally preserve hard links.Matt Kraai2001-12-171-73/+1
|
* Major rework of the directory structure and the entire build system.Eric Andersen2001-10-241-8/+7
| | | | -Erik
* Fix a silly logic error which caused symlinks to be printed twice, andEric Andersen2001-06-301-5/+4
| | | | | wrongly caused the return code to be an error. -Erik
* I reworked make_human_readable_str so it now has a sane interface,Eric Andersen2001-06-131-13/+2
| | | | | | and then fixed up df, du, and ls to use the new interface. I also fixed up some formatting issues in ls while I was in there. -Erik