summaryrefslogtreecommitdiff
path: root/doc/vfs.txt
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 /doc/vfs.txt
parentc6d35a5f4fdda6ae2e98498f19a4adaee6d95692 (diff)
downloadTCE-7c9a48b4e6d66cf4f62e7bad9e22ab06923e47ef.tar.gz
TCE-7c9a48b4e6d66cf4f62e7bad9e22ab06923e47ef.zip
Beginning of a VFS implemented. C++ is great.
Diffstat (limited to 'doc/vfs.txt')
-rw-r--r--doc/vfs.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/doc/vfs.txt b/doc/vfs.txt
index 255ddb0..5a6a0b2 100644
--- a/doc/vfs.txt
+++ b/doc/vfs.txt
@@ -8,11 +8,13 @@ File are objects that implement an abstract file class in the kernel. Its method
- int stat(struct file_info *info)
- file* get_child(char* name)
- int add_child(char* name, file *child)
+- int get_size()
The following syscall interface is given to the process (fd_t is a file descriptor, an int) :
- fd_t open(char* filename, int mode)
- fd_t open_relative(fd_t root, char* filename, int mode)
- int stat(char* filename, struct file_info *info)
+- int stat_relative(fd_t root, char* filename, struct file_info *info)
- int statf(fd_t file, struct file_info *info)
- void close(fd_t file)
- int read(fd_t file, size_t offset, size_t len, char *buffer)
@@ -33,6 +35,7 @@ File open modes flags :
- FM_APPEND append data
- FM_TRUNC truncate existing file
- FM_CREATE create file if it doesn't exist
+- FM_DELETE delete the file - incompatible with everything else
note : if mode contains neither FM_READ nor FM_WRITE, then the file will be created/truncated according to the flags given,
but will not be actually oppenned, so the return value of open will be 0.