summaryrefslogtreecommitdiff
path: root/src/common/include/tce/vfs.h
diff options
context:
space:
mode:
authorAlex AUVOLAT <alexis211@gmail.com>2012-05-17 13:30:09 +0200
committerAlex AUVOLAT <alexis211@gmail.com>2012-05-17 13:30:09 +0200
commit7c9a48b4e6d66cf4f62e7bad9e22ab06923e47ef (patch)
treedf44a926f105c913c77525d35441d20a632f1440 /src/common/include/tce/vfs.h
parentc6d35a5f4fdda6ae2e98498f19a4adaee6d95692 (diff)
downloadTCE-7c9a48b4e6d66cf4f62e7bad9e22ab06923e47ef.tar.gz
TCE-7c9a48b4e6d66cf4f62e7bad9e22ab06923e47ef.zip
Beginning of a VFS implemented. C++ is great.
Diffstat (limited to 'src/common/include/tce/vfs.h')
-rw-r--r--src/common/include/tce/vfs.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/common/include/tce/vfs.h b/src/common/include/tce/vfs.h
new file mode 100644
index 0000000..20ea03b
--- /dev/null
+++ b/src/common/include/tce/vfs.h
@@ -0,0 +1,42 @@
+#ifndef DEF_TCE_VFS_H
+#define DEF_TCE_VFS_H
+
+#include <types.h>
+
+typedef size_t FILE;
+
+typedef struct _file_info {
+ uint32_t type;
+ uint32_t dev_type;
+ uint32_t mode;
+ uint32_t uid, gid;
+ size_t size;
+} file_info;
+
+// file open flags
+#define FM_READ 0x00000001
+#define FM_WRITE 0x00000002
+#define FM_APPEND 0x00000004
+#define FM_TRUNC 0x00000008
+#define FM_CREATE 0x00000010
+#define FM_DELETE 0x00000020
+
+// link modes
+#define LM_SYMLINK 1
+#define LM_HARDLINK 2
+#define LM_MOUNT 3
+#define LM_OUTPUT_TO 4
+
+// file type flags
+#define FT_FILE 0x00000001
+#define FT_DIR 0x00000002
+#define FT_SYMLINK 0x00000004
+#define FT_DEV 0x00000008
+#define FT_TERMINAL 0x00000010
+
+// device types
+#define DT_BLOCK 1
+#define DT_KEYBOARD 2
+#define DT_DISPLAY 3
+
+#endif