mirror of
https://github.com/drasko/codezero.git
synced 2026-02-10 00:43:15 +01:00
VFS updates, readme updates.
Separated vfs file as a specific file. vm file is not always a vfs file. Updated the README sys_open was not returning back to client, added that. Added comments for future vfs additions.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#define __MM0_FILE_H__
|
||||
|
||||
#include <l4/lib/list.h>
|
||||
#include <l4lib/types.h>
|
||||
#include <posix/sys/types.h>
|
||||
|
||||
void vmfile_init(void);
|
||||
@@ -17,6 +18,15 @@ int sys_read(l4id_t sender, int fd, void *buf, int count);
|
||||
int sys_write(l4id_t sender, int fd, void *buf, int count);
|
||||
int sys_lseek(l4id_t sender, int fd, off_t offset, int whence);
|
||||
|
||||
#define vm_file_to_vnum(f) (*(unsigned long *)((f)->priv_data))
|
||||
struct vfs_file_data {
|
||||
unsigned long vnum;
|
||||
};
|
||||
|
||||
#define vm_file_to_vnum(f) \
|
||||
(((struct vfs_file_data *)((f)->priv_data))->vnum)
|
||||
struct vm_file *vfs_file_create(void);
|
||||
|
||||
|
||||
extern struct list_head vm_file_list;
|
||||
|
||||
#endif /* __MM0_FILE_H__ */
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
/* Defines the type of file. A device file? Regular file? One used at boot? */
|
||||
enum VM_FILE_TYPE {
|
||||
VM_FILE_DEVZERO = 1,
|
||||
VM_FILE_REGULAR,
|
||||
VM_FILE_VFS,
|
||||
VM_FILE_BOOTFILE,
|
||||
VM_FILE_SHM,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user