aboutsummaryrefslogtreecommitdiff
path: root/libbb/human_readable.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* du: use Windows-compatible print formatsRon Yorston2018-02-131-3/+3
| | | | | | | | Commit 18afed0f9 replaced %ll* formats with Windows equivalents to silence compiler warnings. Some format strings in du were missed because they weren't compiled or weren't string literals. These fixes make 'du -h' work as expected on Windows XP.
* whitespace and comment format fixes, no code changesDenys Vlasenko2017-10-051-1/+0
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* du: extra compat: with -k and -m, round sizes upDenys Vlasenko2015-10-151-8/+3
| | | | | | | function old new delta print 36 65 +29 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* use auto_string() where appropriate to kill a few staticsDenys Vlasenko2015-10-091-8/+1
| | | | | | | | | | | | | | | | | | | | Custom linker script 'busybox_ldscript' found, using it function old new delta static.str 4 - -4 static.passwd 4 0 -4 bb_ask 322 311 -11 ether_print 63 47 -16 UNSPEC_print 82 66 -16 INET_sprint 59 38 -21 INET6_sprint 54 30 -24 make_human_readable_str 292 235 -57 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 0/7 up/down: 0/-153) Total: -153 bytes text data bss dec hex filename 939880 992 17480 958352 e9f90 busybox_old 939736 992 17456 958184 e9ee8 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Make smart_ulltoa return pointer to end (allows for code shink in callers)Denys Vlasenko2013-09-061-2/+4
| | | | | | | | | | | | | function old new delta smart_ulltoa5 405 408 +3 smart_ulltoa4 273 276 +3 list_table 1113 1114 +1 scale 36 34 -2 put_lu 55 53 -2 ulltoa6_and_space 19 14 -5 powertop_main 1470 1461 -9 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: whitespace fixesDenys Vlasenko2010-10-281-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fdisk: initial stab at GPT partition supportKevin Cernekee2010-10-251-2/+2
| | | | | Signed-off-by: Kevin Cernekee <cernekee@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>
* ls: make it so that group never glues itself to file sizeDenys Vlasenko2010-01-181-1/+1
| | | | | | + smaller enhancements: inode is long long; -h is a bit narrower; etc Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb/human_readable.c: shrink; and reduce bss usageDenys Vlasenko2009-10-131-32/+130
| | | | | | | | | | | | | | | | | | | | 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>
* Fix forgotten license commentsDenis Vlasenko2008-12-071-0/+2
|
* df: add support for more options, add some coreutils 6.10 compat.Denis Vlasenko2008-08-281-12/+21
| | | | | | | | | | | | | | | by Bernhard Reutner-Fischer function old new delta df_main 664 795 +131 packed_usage 24812 24862 +50 make_human_readable_str 213 262 +49 static.ignored_mounts - 8 +8 static.unit_chars - 7 +7 static.zero_and_units 6 - -6 ------------------------------------------------------------------------------ (add/remove: 2/1 grow/shrink: 3/0 up/down: 245/-6) Total: 239 bytes
* *: introduce and use FAST_FUNC: regparm on i386, otherwise no-onDenis Vlasenko2008-06-271-1/+1
| | | | | | | text data bss dec hex filename 808035 611 6868 815514 c719a busybox_old 804472 611 6868 811951 c63af busybox_unstripped
* trylink: produce even more info about final link stageDenis Vlasenko2007-08-121-6/+6
| | | | | | | | | 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
* style fix (stray space before ';')Denis Vlasenko2007-07-211-1/+1
|
* delete tons of extra #includesDenis Vlasenko2007-05-311-1/+0
|
* random style fixes (extra spaces deleted)Denis Vlasenko2007-03-241-2/+2
|
* reshuffle libbb.h contents so that order of decls makes senseDenis Vlasenko2006-10-271-4/+5
| | | | Found bad typo in largefile support :)
* Standardize on the vi editing directives being on the first line."Robert P. J. Day"2006-07-021-0/+1
|
* - Rich Felker writes: fix invalid printf format stringsBernhard Reutner-Fischer2006-03-291-3/+3
| | | | | | | | | http://busybox.net/lists/busybox/2006-March/019568.html text data bss dec hex filename 900619 10316 1038724 1949659 1dbfdb busybox.oorig 900603 10316 1038724 1949643 1dbfcb busybox
* Remove trailing whitespace. Update copyright to include 2004.Eric Andersen2004-03-151-4/+4
|
* "staywithu" writes:Eric Andersen2003-08-221-4/+3
| | | | | | | | | | | | | | | | | | | | | | | In BusyBox v1.00-pre2, commands like ls, df with -h option report a wrong file size for files larger than 4GBtye!! For example, when I execute 'ls -l', it reports -rw-r--r-- 1 root root 5368709120 Aug 17 2003 large_stream.tp when I execute 'ls -lh', I expect that -rw-r--r-- 1 root root 5.0G Aug 17 2003 large_stream.tp but it reports -rw-r--r-- 1 root root 1.0G Aug 17 2003 large_stream.tp I fixed this bug that... Line 31 in libbb/human_readable.c and line 275 include/libbb.h const char *make_human_readable_str(unsigned long size => const char *make_human_readable_str(unsigned long long size It's OK!
* Generalize comment -- no longer ls specificEric Andersen2001-06-301-4/+3
|
* All-integer version (but it does use an unsigned long long) which fixesManuel Novoa III2001-06-301-47/+70
| | | | | | the problems of the previous version (used floating point, overflowed, didn't round properly). The comments at the top of the file are worth reading; especially note 2 concerning "ls -sh".
* I reworked make_human_readable_str so it now has a sane interface,Eric Andersen2001-06-131-22/+26
| | | | | | 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
* Place a temporary bandaid on the ls/du/df human-readable issue. This method isEric Andersen2001-04-031-19/+28
| | | | | | | | | not going to scale up as well as I would like, and Matt Kraai and I have discussed a better long term solution. But for now this will at least make all the human-readable apps give correct answers. Please test the human readable/non-human readable options on your systems!!! -Erik
* Patch bass ackwards behavior of hr flag.Matt Kraai2001-03-281-10/+13
|
* Rewrite to fix bug #1140 and make it slightly smaller.Matt Kraai2001-03-281-26/+14
|
* Convert utility.c into libbb.a. It is now a whole pile of .cEric Andersen2001-03-161-0/+62
files. Clean up the resulting damage and fix up the makefile. -Erik