about summary refs log tree commit diff
path: root/include/sys/statvfs.h
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-09-19 23:35:48 -0400
committerRich Felker <dalias@aerifal.cx>2011-09-19 23:35:48 -0400
commit114c80f1416617399c85c2df09dd307532399903 (patch)
tree5168ccc178e9b854385fa23caab3e055ea7a555c /include/sys/statvfs.h
parent8c07f6eac843c2acb217083d48c4cef95f2b891c (diff)
downloadmusl-114c80f1416617399c85c2df09dd307532399903.tar.gz
musl-114c80f1416617399c85c2df09dd307532399903.tar.xz
musl-114c80f1416617399c85c2df09dd307532399903.zip
fix the definition of struct statvfs to match lsb abi
at the same time, make struct statfs match the traditional definition
and make it more useful, especially the fsid_t stuff.
Diffstat (limited to 'include/sys/statvfs.h')
-rw-r--r--include/sys/statvfs.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/include/sys/statvfs.h b/include/sys/statvfs.h
index 6479be6f..fd22faba 100644
--- a/include/sys/statvfs.h
+++ b/include/sys/statvfs.h
@@ -6,15 +6,28 @@
 #define __NEED_fsfilcnt_t
 #include <bits/alltypes.h>
 
-#include <bits/statfs.h>
+#include <endian.h>
+
+struct statvfs {
+	unsigned long f_bsize, f_frsize;
+	fsblkcnt_t f_blocks, f_bfree, f_bavail;
+	fsfilcnt_t f_files, f_ffree, f_favail;
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+	unsigned long f_fsid;
+	unsigned :8*(2*sizeof(int)-sizeof(long));
+#else
+	unsigned :8*(2*sizeof(int)-sizeof(long));
+	unsigned long f_fsid;
+#endif
+	unsigned long f_flag, f_namemax;
+	int __reserved[6];
+};
 
 int statvfs (const char *, struct statvfs *);
 int fstatvfs (int, struct statvfs *);
 
 #define ST_RDONLY 1
 #define ST_NOSUID 2
-
-#if 0
 #define ST_NODEV  4
 #define ST_NOEXEC 8
 #define ST_SYNCHRONOUS 16
@@ -24,7 +37,6 @@ int fstatvfs (int, struct statvfs *);
 #define ST_IMMUTABLE   512
 #define ST_NOATIME     1024
 #define ST_NODIRATIME  2048
-#endif
 
 
 #endif