A Total Overhaul on the Lunaix's Virtual Memory Model (#26)
[lunaix-os.git] / lunaix-os / kernel / process / taskfs.c
index ca7f61e13c8dfabeb62af094b8cc9fa371068e2f..bc2992132e9382e63eca1bae20115320cad310af 100644 (file)
@@ -4,10 +4,10 @@
 #include <lunaix/process.h>
 #include <lunaix/sched.h>
 
-#include <klibc/stdio.h>
+#include <klibc/strfmt.h>
 #include <klibc/string.h>
 
-#include <sys/dirent_defs.h>
+#include <usr/lunaix/dirent_defs.h>
 
 #define COUNTER_MASK ((1 << 16) - 1)
 
@@ -129,14 +129,16 @@ taskfs_dirlookup(struct v_inode* this, struct v_dnode* dnode)
         return ENOENT;
     }
 
-    return taskfs_mknod(dnode, pid, 0, VFS_IFDIR);
+    return taskfs_mknod(dnode, pid, 0, F_DIR);
 }
 
 static struct v_file_ops taskfs_file_ops = { .close = default_file_close,
                                              .read = default_file_read,
-                                             .read_page = default_file_read,
+                                             .read_page =
+                                               default_file_read_page,
                                              .write = default_file_write,
-                                             .write_page = default_file_write,
+                                             .write_page =
+                                               default_file_write_page,
                                              .readdir = taskfs_readdir,
                                              .seek = default_file_seek };
 static struct v_inode_ops taskfs_inode_ops = { .dir_lookup = taskfs_dirlookup,
@@ -226,4 +228,5 @@ taskfs_init()
     attr_export_table = vcalloc(ATTR_TABLE_LEN, sizeof(struct hbucket));
 
     export_task_attr();
-}
\ No newline at end of file
+}
+EXPORT_FILE_SYSTEM(taskfs, taskfs_init);
\ No newline at end of file