summaryrefslogtreecommitdiff
path: root/ls.c
diff options
context:
space:
mode:
authorEric Andersen2000-09-21 02:23:30 +0000
committerEric Andersen2000-09-21 02:23:30 +0000
commit8a2e56c5dfc41f6946e36234eef4df559286db05 (patch)
tree23a5f54bcbf8aea8f08ae85f8397b7add91bf79f /ls.c
parent350b3f9236b29514f3755af2b4b2957475abf829 (diff)
downloadbusybox-8a2e56c5dfc41f6946e36234eef4df559286db05.zip
busybox-8a2e56c5dfc41f6946e36234eef4df559286db05.tar.gz
Large file >2Gib support.
Diffstat (limited to 'ls.c')
-rw-r--r--ls.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ls.c b/ls.c
index 03fed54..b818003 100644
--- a/ls.c
+++ b/ls.c
@@ -532,7 +532,11 @@ int list_single(struct dnode *dn)
column += 8;
break;
case LIST_BLOCKS:
+#if _FILE_OFFSET_BITS == 64
+ fprintf(stdout, "%4lld ", dn->dstat.st_blocks>>1);
+#else
fprintf(stdout, "%4ld ", dn->dstat.st_blocks>>1);
+#endif
column += 5;
break;
case LIST_MODEBITS:
@@ -578,7 +582,11 @@ int list_single(struct dnode *dn)
if (S_ISBLK(dn->dstat.st_mode) || S_ISCHR(dn->dstat.st_mode)) {
fprintf(stdout, "%4d, %3d ", (int)MAJOR(dn->dstat.st_rdev), (int)MINOR(dn->dstat.st_rdev));
} else {
+#if _FILE_OFFSET_BITS == 64
+ fprintf(stdout, "%9lld ", dn->dstat.st_size);
+#else
fprintf(stdout, "%9ld ", dn->dstat.st_size);
+#endif
}
column += 10;
break;