aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2015-02-25 00:45:50 -0600
committerRob Landley <rob@landley.net>2015-02-25 00:45:50 -0600
commite4c8055a9eff649fe862e24a3f921ce56756ac7b (patch)
treefe3a1f007a790cbd37ec17be49356bc436beb329
parentfb4a241f35cf4baa6d6f2ebef9f3fd9929f4989b (diff)
downloadtoybox-e4c8055a9eff649fe862e24a3f921ce56756ac7b.tar.gz
stat -f didn't work on 32 bit systems because type sizes wrong (fix from Elliott Hughes).0.5.2
-rw-r--r--toys/other/stat.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/toys/other/stat.c b/toys/other/stat.c
index d6033164..a96c1def 100644
--- a/toys/other/stat.c
+++ b/toys/other/stat.c
@@ -106,11 +106,11 @@ static void print_stat(char type)
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')