summaryrefslogtreecommitdiff
path: root/lib/fsusage.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-07-15 07:50:06 +0000
committerJim Meyering <jim@meyering.net>1999-07-15 07:50:06 +0000
commit6970bbc17b7898ab3fde201932795db393c4c8ee (patch)
tree3194cae998382392a382de82d584c1be3f5ab61d /lib/fsusage.c
parentdb26cba77c26cdce2b2822d998c7061b35bdf47c (diff)
downloadcoreutils-6970bbc17b7898ab3fde201932795db393c4c8ee.tar.xz
(get_fs_usage) [STATFS_TRUNCATES_BLOCK_COUNTS]:
Work around SunOS botch also when block size is different from 1k.
Diffstat (limited to 'lib/fsusage.c')
-rw-r--r--lib/fsusage.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/fsusage.c b/lib/fsusage.c
index 65d63bcc1..a7ebf2417 100644
--- a/lib/fsusage.c
+++ b/lib/fsusage.c
@@ -1,5 +1,5 @@
/* fsusage.c -- return space usage of mounted filesystems
- Copyright (C) 1991, 1992, 1996, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1992, 1996, 1998, 1999 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -184,7 +184,7 @@ get_fs_usage (const char *path, const char *disk, struct fs_usage *fsp)
truncation, presumably without botching the 4.1.1 case, in which
the values are not truncated. The correct counts are stored in
undocumented spare fields. */
- if (fsd.f_blocks == 0x1fffff && fsd.f_spare[0] > 0)
+ if (fsd.f_blocks == 0x7fffffff / fsd.f_bsize && fsd.f_spare[0] > 0)
{
fsd.f_blocks = fsd.f_spare[0];
fsd.f_bfree = fsd.f_spare[1];