-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
447f183
commit 75bc44d
Showing
2 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#include "full_format.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
#include "file_table_v2.h" | ||
#include "fuse_high_level_ops_base.h" | ||
#include "platform.h" | ||
|
||
namespace securefs::full_format | ||
{ | ||
|
||
class FuseHighLevelOps : public ::securefs::FuseHighLevelOpsBase | ||
{ | ||
public: | ||
INJECT(FuseHighLevelOps(OSService& root, FileTable& ft)) : root_(root), ft_(ft) {} | ||
|
||
void initialize(fuse_conn_info* info) override {} | ||
int vstatfs(const char* path, fuse_statvfs* buf, const fuse_context* ctx) override; | ||
int vgetattr(const char* path, fuse_stat* st, const fuse_context* ctx) override; | ||
int vfgetattr(const char* path, | ||
fuse_stat* st, | ||
fuse_file_info* info, | ||
const fuse_context* ctx) override; | ||
int vopendir(const char* path, fuse_file_info* info, const fuse_context* ctx) override; | ||
int vreleasedir(const char* path, fuse_file_info* info, const fuse_context* ctx) override; | ||
int vreaddir(const char* path, | ||
void* buf, | ||
fuse_fill_dir_t filler, | ||
fuse_off_t off, | ||
fuse_file_info* info, | ||
const fuse_context* ctx) override; | ||
int vcreate(const char* path, | ||
fuse_mode_t mode, | ||
fuse_file_info* info, | ||
const fuse_context* ctx) override; | ||
int vopen(const char* path, fuse_file_info* info, const fuse_context* ctx) override; | ||
int vrelease(const char* path, fuse_file_info* info, const fuse_context* ctx) override; | ||
int vread(const char* path, | ||
char* buf, | ||
size_t size, | ||
fuse_off_t offset, | ||
fuse_file_info* info, | ||
const fuse_context* ctx) override; | ||
int vwrite(const char* path, | ||
const char* buf, | ||
size_t size, | ||
fuse_off_t offset, | ||
fuse_file_info* info, | ||
const fuse_context* ctx) override; | ||
int vflush(const char* path, fuse_file_info* info, const fuse_context* ctx) override; | ||
int vftruncate(const char* path, | ||
fuse_off_t len, | ||
fuse_file_info* info, | ||
const fuse_context* ctx) override; | ||
int vunlink(const char* path, const fuse_context* ctx) override; | ||
int vmkdir(const char* path, fuse_mode_t mode, const fuse_context* ctx) override; | ||
int vrmdir(const char* path, const fuse_context* ctx) override; | ||
int vchmod(const char* path, fuse_mode_t mode, const fuse_context* ctx) override; | ||
int vchown(const char* path, fuse_uid_t uid, fuse_gid_t gid, const fuse_context* ctx) override; | ||
int vsymlink(const char* to, const char* from, const fuse_context* ctx) override; | ||
int vlink(const char* src, const char* dest, const fuse_context* ctx) override; | ||
int vreadlink(const char* path, char* buf, size_t size, const fuse_context* ctx) override; | ||
int vrename(const char* from, const char* to, const fuse_context* ctx) override; | ||
int | ||
vfsync(const char* path, int datasync, fuse_file_info* info, const fuse_context* ctx) override; | ||
int vtruncate(const char* path, fuse_off_t len, const fuse_context* ctx) override; | ||
int vutimens(const char* path, const fuse_timespec* ts, const fuse_context* ctx) override; | ||
int vlistxattr(const char* path, char* list, size_t size, const fuse_context* ctx) override; | ||
int vgetxattr(const char* path, | ||
const char* name, | ||
char* value, | ||
size_t size, | ||
uint32_t position, | ||
const fuse_context* ctx) override; | ||
int vsetxattr(const char* path, | ||
const char* name, | ||
const char* value, | ||
size_t size, | ||
int flags, | ||
uint32_t position, | ||
const fuse_context* ctx) override; | ||
int vremovexattr(const char* path, const char* name, const fuse_context* ctx) override; | ||
|
||
private: | ||
OSService& root_; | ||
FileTable& ft_; | ||
}; | ||
} // namespace securefs::full_format |