OSDN Git Service

Fix ls -lh.
authorElliott Hughes <enh@google.com>
Mon, 12 Sep 2016 19:30:33 +0000 (12:30 -0700)
committerRob Landley <rob@landley.net>
Wed, 14 Sep 2016 20:01:51 +0000 (15:01 -0500)
The recent refactoring broke ls -lh by multiplying all sizes by 0
rather than 1.

toys/posix/ls.c

index a336ba1..ab1251a 100644 (file)
@@ -463,7 +463,7 @@ static void listfiles(int dirfd, struct dirtree *indir)
         printf("% *d,% 4d", totals[5]-4, dev_major(st->st_rdev),
           dev_minor(st->st_rdev));
       else {
-        print_with_h(tmp, st->st_size, 0);
+        print_with_h(tmp, st->st_size, 1);
         printf("%*s", totals[5]+1, tmp);
       }