streamlined code

This commit is contained in:
Emma Nora Theuer 2024-11-13 17:24:31 +01:00
parent c32f7e22ec
commit 095d4452e5

14
io.h
View file

@ -3,11 +3,16 @@
#define MAX_FDS 1024
#include <stdlib.h>
#include <sys/types.h>
#include <stdarg.h>
#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)