Implement VFS syscalls
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m29s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m29s
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include <libk/list.h>
|
||||
#include <libk/std.h>
|
||||
#include <m/fs_desc_buffer.h>
|
||||
#include <proc/procgroup.h>
|
||||
#include <sync/spin_lock.h>
|
||||
|
||||
#define VFS_RAMDISKFS 0
|
||||
@@ -14,6 +15,8 @@ struct vfs_mountpoint {
|
||||
struct hash_node_link mount_table_link;
|
||||
int fs_type;
|
||||
spin_lock_t lock;
|
||||
bool locked;
|
||||
struct procgroup* ownerpg;
|
||||
struct {
|
||||
bool (*mount) (struct vfs_mountpoint* mountpoint);
|
||||
int (*describe) (struct vfs_mountpoint* mountpoint, const char* path,
|
||||
@@ -29,8 +32,13 @@ struct vfs_mount_table {
|
||||
};
|
||||
|
||||
struct vfs_mountpoint* vfs_create_mountpoint (const char* key, int fs_type);
|
||||
int vfs_describe (const char* mountpoint, const char* path, struct fs_desc_buffer* desc);
|
||||
int vfs_read (const char* mountpoint, const char* path, uint8_t* buffer, size_t off, size_t size);
|
||||
int vfs_describe (struct procgroup* procgroup, const char* mountpoint, const char* path,
|
||||
struct fs_desc_buffer* desc);
|
||||
int vfs_read (struct procgroup* procgroup, const char* mountpoint, const char* path,
|
||||
uint8_t* buffer, size_t off, size_t size);
|
||||
int vfs_close (struct procgroup* procgroup, const char* mountpoint, const char* path);
|
||||
int vfs_open (struct procgroup* procgroup, const char* mountpoint, const char* path);
|
||||
void vfs_procgroup_cleanup (struct procgroup* procgroup);
|
||||
void vfs_init (void);
|
||||
|
||||
#endif // _KERNEL_FS_VFS_H
|
||||
|
||||
Reference in New Issue
Block a user