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:
45
kernel/fs/def_vfs_op.h
Normal file
45
kernel/fs/def_vfs_op.h
Normal file
@@ -0,0 +1,45 @@
|
||||
#ifndef _KERNEL_FS_DEF_VFS_OP_H
|
||||
#define _KERNEL_FS_DEF_VFS_OP_H
|
||||
|
||||
#include <aux/compiler.h>
|
||||
|
||||
#define DEFINE_VFS_MOUNT(name) \
|
||||
int name (struct vfs_volume* UNUSED volume, struct proc* UNUSED proc, \
|
||||
struct reschedule_ctx* UNUSED rctx, bool UNUSED format)
|
||||
|
||||
#define DEFINE_VFS_FORMAT(name) \
|
||||
int name (struct vfs_volume* UNUSED volume, struct proc* UNUSED proc, \
|
||||
struct reschedule_ctx* UNUSED rctx)
|
||||
|
||||
#define DEFINE_VFS_DESCRIBE(name) \
|
||||
int name (struct vfs_volume* UNUSED volume, struct proc* UNUSED proc, \
|
||||
struct reschedule_ctx* UNUSED rctx, const char* UNUSED path, struct desc* UNUSED desc)
|
||||
|
||||
#define DEFINE_VFS_READ_FILE(name) \
|
||||
int name (struct vfs_volume* UNUSED volume, struct proc* UNUSED proc, \
|
||||
struct reschedule_ctx* UNUSED rctx, const char* UNUSED path, uint8_t* UNUSED buffer, \
|
||||
size_t UNUSED off, size_t UNUSED size)
|
||||
|
||||
#define DEFINE_VFS_WRITE_FILE(name) \
|
||||
int name (struct vfs_volume* UNUSED volume, struct proc* UNUSED proc, \
|
||||
struct reschedule_ctx* UNUSED rctx, const char* UNUSED path, uint8_t* UNUSED buffer, \
|
||||
size_t UNUSED off, size_t UNUSED size, uint32_t UNUSED flags)
|
||||
|
||||
#define DEFINE_VFS_READ_DIR_ENTRY(name) \
|
||||
int name (struct vfs_volume* UNUSED volume, struct proc* UNUSED proc, \
|
||||
struct reschedule_ctx* UNUSED rctx, const char* UNUSED path, \
|
||||
struct dir_entry* UNUSED entry, size_t UNUSED entry_num)
|
||||
|
||||
#define DEFINE_VFS_CREATE_FILE(name) \
|
||||
int name (struct vfs_volume* UNUSED volume, struct proc* UNUSED proc, \
|
||||
struct reschedule_ctx* UNUSED rctx, const char* UNUSED path)
|
||||
|
||||
#define DEFINE_VFS_CREATE_DIR(name) \
|
||||
int name (struct vfs_volume* UNUSED volume, struct proc* UNUSED proc, \
|
||||
struct reschedule_ctx* UNUSED rctx, const char* UNUSED path)
|
||||
|
||||
#define DEFINE_VFS_REMOVE(name) \
|
||||
int name (struct vfs_volume* UNUSED volume, struct proc* UNUSED proc, \
|
||||
struct reschedule_ctx* UNUSED rctx, const char* UNUSED path)
|
||||
|
||||
#endif // _KERNEL_FS_DEF_VFS_OP_H
|
||||
Reference in New Issue
Block a user