got some of the pty actually working in userspace
This commit is contained in:
@@ -16,6 +16,7 @@ typedef uint32_t (*read_type_t)(struct vfs_node* node, uint32_t offset, uint32_t
|
||||
typedef uint32_t (*write_type_t)(struct vfs_node* node, uint32_t offset, uint32_t size, uint8_t* buffer);
|
||||
typedef struct vfs_node* (*finddir_type_t)(struct vfs_node* node, const char* name);
|
||||
typedef struct vfs_node* (*mkdir_type_t)(struct vfs_node* node, const char* name);
|
||||
typedef struct vfs_node* (*create_type_t)(struct vfs_node* node, const char* name);
|
||||
|
||||
typedef struct vfs_node {
|
||||
char name[128];
|
||||
@@ -29,6 +30,7 @@ typedef struct vfs_node {
|
||||
write_type_t write;
|
||||
finddir_type_t find;
|
||||
mkdir_type_t mkdir;
|
||||
create_type_t create;
|
||||
|
||||
struct vfs_node* mnt;
|
||||
void* data;
|
||||
@@ -43,6 +45,8 @@ typedef struct {
|
||||
vfs_node_t* vfs_create_root();
|
||||
vfs_node_t* vfs_mkdir(vfs_node_t* parent, const char* name);
|
||||
|
||||
vfs_node_t* vfs_find(const char* path);
|
||||
|
||||
void vfs_mount(vfs_node_t* _mnt, vfs_node_t* _fs);
|
||||
int vfs_open(const char* path, int flags);
|
||||
int vfs_read(int fd, void* buf, size_t sz);
|
||||
|
||||
Reference in New Issue
Block a user