From 81bcc92c3222fe70116f010c7a8e3e578015022a Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Thu, 15 Feb 2001 18:59:02 +0000 Subject: [PATCH] Fixed 'ls -s' so it actually displays block sizes again. -Erik --- coreutils/ls.c | 6 +++--- ls.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/coreutils/ls.c b/coreutils/ls.c index 06e23e612..dd38dd5f3 100644 --- a/coreutils/ls.c +++ b/coreutils/ls.c @@ -610,7 +610,7 @@ int list_single(struct dnode *dn) break; case LIST_BLOCKS: #ifdef BB_FEATURE_HUMAN_READABLE - fprintf(stdout, "%5s ", format(dn->dstat.st_size, ls_disp_hr)); + fprintf(stdout, "%5s ", format(dn->dstat.st_blocks>>1, 1)); #else #if _FILE_OFFSET_BITS == 64 printf("%4lld ", dn->dstat.st_blocks>>1); @@ -650,9 +650,9 @@ int list_single(struct dnode *dn) fprintf(stdout, "%9s ", format(dn->dstat.st_size, ls_disp_hr)); #else #if _FILE_OFFSET_BITS == 64 - printf("%9lld ", dn->dstat.st_size); + printf("%9lld ", dn->dstat.st_size>>1); #else - printf("%9ld ", dn->dstat.st_size); + printf("%9ld ", dn->dstat.st_size>>1); #endif #endif } diff --git a/ls.c b/ls.c index 06e23e612..dd38dd5f3 100644 --- a/ls.c +++ b/ls.c @@ -610,7 +610,7 @@ int list_single(struct dnode *dn) break; case LIST_BLOCKS: #ifdef BB_FEATURE_HUMAN_READABLE - fprintf(stdout, "%5s ", format(dn->dstat.st_size, ls_disp_hr)); + fprintf(stdout, "%5s ", format(dn->dstat.st_blocks>>1, 1)); #else #if _FILE_OFFSET_BITS == 64 printf("%4lld ", dn->dstat.st_blocks>>1); @@ -650,9 +650,9 @@ int list_single(struct dnode *dn) fprintf(stdout, "%9s ", format(dn->dstat.st_size, ls_disp_hr)); #else #if _FILE_OFFSET_BITS == 64 - printf("%9lld ", dn->dstat.st_size); + printf("%9lld ", dn->dstat.st_size>>1); #else - printf("%9ld ", dn->dstat.st_size); + printf("%9ld ", dn->dstat.st_size>>1); #endif #endif } -- 2.25.1