summaryrefslogtreecommitdiffstats
path: root/usr/klibc/statfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/klibc/statfs.c')
-rw-r--r--usr/klibc/statfs.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/usr/klibc/statfs.c b/usr/klibc/statfs.c
new file mode 100644
index 0000000..b8b8700
--- /dev/null
+++ b/usr/klibc/statfs.c
@@ -0,0 +1,19 @@
+/*
+ * statfs.c
+ *
+ * On architectures which do statfs64, wrap the system call
+ */
+
+#include <sys/syscall.h>
+#include <sys/vfs.h>
+
+#ifdef __NR_statfs64
+
+extern int __statfs64(const char *, size_t, struct statfs *);
+
+int statfs(const char *path, struct statfs *buf)
+{
+ return __statfs64(path, sizeof *buf, buf);
+}
+
+#endif