From 0bf44d00a42dec70514c2e51926f4ca37b4b2367 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 13 Oct 2009 01:25:09 +0200 Subject: libbb/human_readable.c: shrink; and reduce bss usage 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 --- coreutils/ls.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'coreutils/ls.c') diff --git a/coreutils/ls.c b/coreutils/ls.c index a067aa36c..38cabcab6 100644 --- a/coreutils/ls.c +++ b/coreutils/ls.c @@ -829,7 +829,9 @@ static NOINLINE unsigned list_single(const struct dnode *dn) } else { if (all_fmt & LS_DISP_HR) { column += printf("%9s ", - make_human_readable_str(dn->dstat.st_size, 1, 0)); + /* print st_size, show one fractional, use suffixes */ + make_human_readable_str(dn->dstat.st_size, 1, 0) + ); } else { column += printf("%9"OFF_FMT"u ", (off_t) dn->dstat.st_size); } -- cgit v1.2.3