Wrap filesystem op in macros
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m32s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m32s
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include <desc.h>
|
||||
#include <device/device.h>
|
||||
#include <dir_entry.h>
|
||||
#include <fs/def_vfs_op.h>
|
||||
#include <libk/std.h>
|
||||
#include <proc/proc.h>
|
||||
#include <proc/reschedule.h>
|
||||
@@ -34,30 +35,22 @@ struct tarfs {
|
||||
|
||||
struct vfs_volume;
|
||||
|
||||
int tarfs_mount (struct vfs_volume* volume, struct proc* proc, struct reschedule_ctx* rctx,
|
||||
bool format);
|
||||
DEFINE_VFS_MOUNT (tarfs_mount);
|
||||
|
||||
int tarfs_format (struct vfs_volume* volume, struct proc* proc, struct reschedule_ctx* rctx);
|
||||
DEFINE_VFS_FORMAT (tarfs_format);
|
||||
|
||||
int tarfs_describe (struct vfs_volume* volume, struct proc* proc, struct reschedule_ctx* rctx,
|
||||
const char* path, struct desc* desc);
|
||||
DEFINE_VFS_DESCRIBE (tarfs_describe);
|
||||
|
||||
int tarfs_read_file (struct vfs_volume* volume, struct proc* proc, struct reschedule_ctx* rctx,
|
||||
const char* path, uint8_t* buffer, size_t off, size_t size);
|
||||
DEFINE_VFS_READ_FILE (tarfs_read_file);
|
||||
|
||||
int tarfs_write_file (struct vfs_volume* volume, struct proc* proc, struct reschedule_ctx* rctx,
|
||||
const char* path, uint8_t* buffer, size_t off, size_t size, uint32_t flags);
|
||||
DEFINE_VFS_WRITE_FILE (tarfs_write_file);
|
||||
|
||||
int tarfs_read_dir_entry (struct vfs_volume* volume, struct proc* proc, struct reschedule_ctx* rctx,
|
||||
const char* path, struct dir_entry* entry, size_t entry_num);
|
||||
DEFINE_VFS_READ_DIR_ENTRY (tarfs_read_dir_entry);
|
||||
|
||||
int tarfs_create_file (struct vfs_volume* volume, struct proc* proc, struct reschedule_ctx* rctx,
|
||||
const char* path);
|
||||
DEFINE_VFS_CREATE_FILE (tarfs_create_file);
|
||||
|
||||
int tarfs_create_dir (struct vfs_volume* volume, struct proc* proc, struct reschedule_ctx* rctx,
|
||||
const char* path);
|
||||
DEFINE_VFS_CREATE_DIR (tarfs_create_dir);
|
||||
|
||||
int tarfs_remove (struct vfs_volume* volume, struct proc* proc, struct reschedule_ctx* rctx,
|
||||
const char* path);
|
||||
DEFINE_VFS_REMOVE (tarfs_remove);
|
||||
|
||||
#endif // _KERNEL_FS_TARFS_H
|
||||
|
||||
Reference in New Issue
Block a user