aboutsummaryrefslogtreecommitdiff
path: root/src/common/include/fs.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/include/fs.h')
-rw-r--r--src/common/include/fs.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common/include/fs.h b/src/common/include/fs.h
index 2ab0760..1ee3d5e 100644
--- a/src/common/include/fs.h
+++ b/src/common/include/fs.h
@@ -11,6 +11,8 @@
#define FT_FIFO (0x10)
// #define FT_SOCKET (0x20) // Not yet! Semantics not defined. (TODO)
+// FM_* enum describes modes for opening a file as well as authorized operations in stat_t
+// (some flags are used only for open() or only in stat_t.access)
#define FM_READ (0x01)
#define FM_WRITE (0x02)
#define FM_READDIR (0x04)
@@ -18,6 +20,9 @@
#define FM_CREATE (0x10)
#define FM_TRUNC (0x20)
#define FM_APPEND (0x40)
+#define FM_DCREATE (0x100) // create file in directory
+#define FM_DMOVE (0x200) // move file from directory
+#define FM_DUNLINK (0x400) // delete file from directory
typedef struct {
int type;
@@ -30,6 +35,7 @@ typedef struct {
typedef struct {
char name[DIR_MAX];
+ stat_t st;
} dirent_t;