changeset 1702:8ce8c5365f8b draft 0.5.2

stat -f didn't work on 32 bit systems because type sizes wrong (fix from Elliott Hughes).
author Rob Landley <rob@landley.net>
date Wed, 25 Feb 2015 00:45:50 -0600
parents 83c14a9cd0fe
children b248ef9d3f3e
files toys/other/stat.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/toys/other/stat.c	Wed Feb 18 15:19:15 2015 -0600
+++ b/toys/other/stat.c	Wed Feb 25 00:45:50 2015 -0600
@@ -106,11 +106,11 @@
 static void print_statfs(char type) {
   struct statfs *statfs = (struct statfs *)&TT.stat;
 
-  if (type == 'a') xprintf("%lu", statfs->f_bavail);
-  else if (type == 'b') xprintf("%lu", statfs->f_blocks);
-  else if (type == 'c') xprintf("%lu", statfs->f_files);
-  else if (type == 'd') xprintf("%lu", statfs->f_ffree);
-  else if (type == 'f') xprintf("%lu", statfs->f_bfree);
+  if (type == 'a') xprintf("%llu", statfs->f_bavail);
+  else if (type == 'b') xprintf("%llu", statfs->f_blocks);
+  else if (type == 'c') xprintf("%llu", statfs->f_files);
+  else if (type == 'd') xprintf("%llu", statfs->f_ffree);
+  else if (type == 'f') xprintf("%llu", statfs->f_bfree);
   else if (type == 'l') xprintf("%ld", statfs->f_namelen);
   else if (type == 't') xprintf("%lx", statfs->f_type);
   else if (type == 'i')