# HG changeset patch # User Jim Meyering # Date 932025006 0 # Node ID 663e86d5d38c10403359e4dee6679cf5ba4abefe # Parent 21700f6d67221fea31b43d0af6c1709d0b59d998 (get_fs_usage) [STATFS_TRUNCATES_BLOCK_COUNTS]: Work around SunOS botch also when block size is different from 1k. diff --git a/lib/fsusage.c b/lib/fsusage.c --- 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 @@ 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];