diff --git a/io.h b/io.h index 2c35a1f..5424a99 100644 --- a/io.h +++ b/io.h @@ -3,11 +3,16 @@ #define MAX_FDS 1024 -#include -#include - +#include #include "inode.h" +enum Flags { + O_READ = 1, + O_WRITE = 2, + O_APPEND = 4, + O_CREATE = 8 +}; + struct file_descriptor { Inode *inode; off_t offset; @@ -19,7 +24,8 @@ struct Process { struct file_descriptor fd_table[MAX_FDS]; }; -int allocate_fd(struct Process proc, Inode inode, int flags); +struct Process* initialize_process(); +int allocate_fd(struct Process proc, Inode inode, int flags, ...); int emmafs_open(char name[]); int emmafs_close(char name[]); //int emmafs_read(int fd)