aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorAlex Auvolat <alex.auvolat@ens.fr>2015-02-12 15:35:11 +0100
committerAlex Auvolat <alex.auvolat@ens.fr>2015-02-12 15:35:11 +0100
commit2432a437a715f7220697d13aae13e97087709842 (patch)
tree649c10b6765e02045f5b9d00dda5da13c9a07bd2 /src/common
parent30516ae9a217982ec4027cef4b7525b2a74fe3c7 (diff)
downloadkogata-2432a437a715f7220697d13aae13e97087709842.tar.gz
kogata-2432a437a715f7220697d13aae13e97087709842.zip
DOES NOT COMPILE | VFS structure change (VFS centralises more stuff)
Diffstat (limited to 'src/common')
-rw-r--r--src/common/include/fs.h29
1 files changed, 24 insertions, 5 deletions
diff --git a/src/common/include/fs.h b/src/common/include/fs.h
index 6cd624e..d97f0fe 100644
--- a/src/common/include/fs.h
+++ b/src/common/include/fs.h
@@ -3,15 +3,34 @@
#include <stdint.h>
#include <stddef.h>
-typedef struct {
- size_t size;
- // TODO : times & more metadata
-} stat_t;
+#define FT_REGULAR 0 // no flags = regular file
+#define FT_DIR (0x01)
+#define FT_DEV (0x02)
+#define FT_BLOCKDEV (0x04)
+#define FT_CHARDEV (0x08)
+#define FT_FIFO (0x10)
+#define FT_SOCKET (0x20)
#define FM_READ (0x01)
#define FM_WRITE (0x02)
-#define FM_MMAP (0x04)
+#define FM_READDIR (0x04)
+#define FM_MMAP (0x08)
#define FM_CREATE (0x10)
#define FM_TRUNC (0x20)
#define FM_APPEND (0x40)
+typedef struct {
+ int type;
+ int access;
+ size_t size;
+ // TODO : times & more metadata
+} stat_t;
+
+#define DIR_MAX 128 // maximum length for a filename
+
+typedef struct {
+ char name[DIR_MAX];
+} dirent_t;
+
+
+/* vim: set ts=4 sw=4 tw=0 noet :*/