summaryrefslogtreecommitdiffhomepage
path: root/coreutils/ls.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2000-09-21 02:23:30 +0000
committerEric Andersen <andersen@codepoet.org>2000-09-21 02:23:30 +0000
commit8a2e56c5dfc41f6946e36234eef4df559286db05 (patch)
tree23a5f54bcbf8aea8f08ae85f8397b7add91bf79f /coreutils/ls.c
parent350b3f9236b29514f3755af2b4b2957475abf829 (diff)
Large file >2Gib support.
Diffstat (limited to 'coreutils/ls.c')
-rw-r--r--coreutils/ls.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/coreutils/ls.c b/coreutils/ls.c
index 03fed5478..b818003a8 100644
--- a/coreutils/ls.c
+++ b/coreutils/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;