summaryrefslogtreecommitdiff
path: root/lib/fsusage.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1993-04-15 01:58:23 +0000
committerJim Meyering <jim@meyering.net>1993-04-15 01:58:23 +0000
commit29c0442cadced638d3f26b50db5a6328ad7b82d9 (patch)
tree2a8e508d291fa2d0705b3d3f1cc7cc2efcf02c61 /lib/fsusage.c
parent0c6e5c710bac25a3676d0c04b185b70a7bfcf8b7 (diff)
downloadcoreutils-29c0442cadced638d3f26b50db5a6328ad7b82d9.tar.xz
merge with 3.4.7
Diffstat (limited to 'lib/fsusage.c')
-rw-r--r--lib/fsusage.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/fsusage.c b/lib/fsusage.c
index b43491343..2a1fe86c7 100644
--- a/lib/fsusage.c
+++ b/lib/fsusage.c
@@ -20,6 +20,10 @@
int statfs ();
+#if defined (STATFS_OSF1) /* DEC Alpha running OSF/1 */
+# include <sys/mount.h>
+#endif
+
#if defined(STAT_STATFS2_BSIZE) && !defined(_IBMR2) /* 4.3BSD, SunOS 4, HP-UX, AIX PS/2. */
#include <sys/vfs.h>
#endif
@@ -80,6 +84,14 @@ get_fs_usage (path, disk, fsp)
char *path, *disk;
struct fs_usage *fsp;
{
+#if defined (STATFS_OSF1)
+ struct statfs fsd;
+
+ if (statfs (path, &fsd, sizeof (struct statfs)) != 0)
+ return (-1);
+#define convert_blocks(b) adjust_blocks ((b),fsd.f_fsize, 512)
+#endif /* STATFS_OSF1 */
+
#ifdef STAT_STATFS2_FS_DATA /* Ultrix. */
struct fs_data fsd;