diff options
| author | Franklin Wei <frankhwei536@gmail.com> | 2015-03-02 21:37:44 -0500 |
|---|---|---|
| committer | Franklin Wei <frankhwei536@gmail.com> | 2015-03-02 21:37:44 -0500 |
| commit | a0721b4caa79b81e021678089fde0b8467daa1cd (patch) | |
| tree | 56af15c29704cc4c6738345ccd6c9db3782fd8d1 /docs | |
| parent | 46e94578765d3d2f03b83421d752e5dfc3e56d34 (diff) | |
| download | kappa-master.zip kappa-master.tar.gz kappa-master.tar.bz2 kappa-master.tar.xz | |
Diffstat (limited to '')
| -rw-r--r-- | docs/FILESYSTEM | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/docs/FILESYSTEM b/docs/FILESYSTEM new file mode 100644 index 0000000..a1bdc1e --- /dev/null +++ b/docs/FILESYSTEM @@ -0,0 +1,34 @@ +=== Virtual Filesystem Design === + +The virtual (in-RAM) filesystem is made of levels of nodes. + + NULL + | + [/] --- NULL + | + [bin] --------------------------- [etc] ---------------------- [home] --- [var] --- NULL + | | + [cat] --- [cd] --- [ls] --- NULL [group] --- [passwd] --- NULL + +=== Sample Implementation === + +struct vfs_node { + unsigned int flags; + unsigned int name_len; + char *name; + uint64_t file_len; + unsigned char *contents; + struct vfs_node *parent; + struct vfs_node *next; + struct vfs_node *child; +}; + +=== The 'flags' field === + += Bits 0-1 = + +The next three values are mutually exclusive. + +0: directory +1: regular file +2: special file |