[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT PATCH 5/5] lib/nolibc/include: import statfs.h from musl



This is a combination of include/sys/statfs.h and
arch/generic/bits/statfs.h. We do not need to provide different
statfs.h for different architectures, because this files differs only
for mips*, s390x, x32, which we do not have plans to support.

tag: v1.1.20
commit: 0fa1e638e87cf257e9f96b4019b2076afd674a19

Signed-off-by: Yuri Volchkov <yuri.volchkov@xxxxxxxxx>
---
 lib/nolibc/include/sys/statfs.h | 36 +++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 lib/nolibc/include/sys/statfs.h

diff --git a/lib/nolibc/include/sys/statfs.h b/lib/nolibc/include/sys/statfs.h
new file mode 100644
index 00000000..f3eccab6
--- /dev/null
+++ b/lib/nolibc/include/sys/statfs.h
@@ -0,0 +1,36 @@
+#ifndef        _SYS_STATFS_H
+#define        _SYS_STATFS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <sys/statvfs.h>
+
+typedef struct __fsid_t {
+       int __val[2];
+} fsid_t;
+
+struct statfs {
+       unsigned long f_type, f_bsize;
+       fsblkcnt_t f_blocks, f_bfree, f_bavail;
+       fsfilcnt_t f_files, f_ffree;
+       fsid_t f_fsid;
+       unsigned long f_namelen, f_frsize, f_flags, f_spare[4];
+};
+
+int statfs (const char *, struct statfs *);
+int fstatfs (int, struct statfs *);
+
+#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
+#define statfs64 statfs
+#define fstatfs64 fstatfs
+#define fsblkcnt64_t fsblkcnt_t
+#define fsfilcnt64_t fsfilcnt_t
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
-- 
2.19.2


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.