ls -s was reporting bytes instead of blocks.
authorManuel Novoa III <mjn3@codepoet.org>
Sat, 30 Jun 2001 07:46:50 +0000 (07:46 -0000)
committerManuel Novoa III <mjn3@codepoet.org>
Sat, 30 Jun 2001 07:46:50 +0000 (07:46 -0000)
coreutils/ls.c
ls.c

index d9ecf04901b865f48a18021c2cdea7c2ebb99afe..e51a3bc0bcc86760a312c706ff59817bd2c645f6 100644 (file)
@@ -611,7 +611,7 @@ static int list_single(struct dnode *dn)
                        case LIST_BLOCKS:
 #ifdef BB_FEATURE_HUMAN_READABLE
                                fprintf(stdout, "%4s ", make_human_readable_str(dn->dstat.st_blocks>>1, 
-                                                       KILOBYTE, (ls_disp_hr==TRUE)? 0: 1));
+                                                       KILOBYTE, (ls_disp_hr==TRUE)? 0: KILOBYTE));
 #else
 #if _FILE_OFFSET_BITS == 64
                                printf("%4lld ", dn->dstat.st_blocks>>1);
diff --git a/ls.c b/ls.c
index d9ecf04901b865f48a18021c2cdea7c2ebb99afe..e51a3bc0bcc86760a312c706ff59817bd2c645f6 100644 (file)
--- a/ls.c
+++ b/ls.c
@@ -611,7 +611,7 @@ static int list_single(struct dnode *dn)
                        case LIST_BLOCKS:
 #ifdef BB_FEATURE_HUMAN_READABLE
                                fprintf(stdout, "%4s ", make_human_readable_str(dn->dstat.st_blocks>>1, 
-                                                       KILOBYTE, (ls_disp_hr==TRUE)? 0: 1));
+                                                       KILOBYTE, (ls_disp_hr==TRUE)? 0: KILOBYTE));
 #else
 #if _FILE_OFFSET_BITS == 64
                                printf("%4lld ", dn->dstat.st_blocks>>1);