-
Notifications
You must be signed in to change notification settings - Fork 1
/
wrap.cc
97 lines (92 loc) · 3.69 KB
/
wrap.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#include "wrap.hh"
#include "examplefs.hh"
void set_rootdir(const char *path) {
ExampleFS::Instance()->setRootDir(path);
}
int wrap_getattr(const char *path, struct stat *statbuf) {
return ExampleFS::Instance()->Getattr(path, statbuf);
}
int wrap_readlink(const char *path, char *link, size_t size) {
return ExampleFS::Instance()->Readlink(path, link, size);
}
int wrap_mknod(const char *path, mode_t mode, dev_t dev) {
return ExampleFS::Instance()->Mknod(path, mode, dev);
}
int wrap_mkdir(const char *path, mode_t mode) {
return ExampleFS::Instance()->Mkdir(path, mode);
}
int wrap_unlink(const char *path) {
return ExampleFS::Instance()->Unlink(path);
}
int wrap_rmdir(const char *path) {
return ExampleFS::Instance()->Rmdir(path);
}
int wrap_symlink(const char *path, const char *link) {
return ExampleFS::Instance()->Symlink(path, link);
}
int wrap_rename(const char *path, const char *newpath) {
return ExampleFS::Instance()->Rename(path, newpath);
}
int wrap_link(const char *path, const char *newpath) {
return ExampleFS::Instance()->Link(path, newpath);
}
int wrap_chmod(const char *path, mode_t mode) {
return ExampleFS::Instance()->Chmod(path, mode);
}
int wrap_chown(const char *path, uid_t uid, gid_t gid) {
return ExampleFS::Instance()->Chown(path, uid, gid);
}
int wrap_truncate(const char *path, off_t newSize) {
return ExampleFS::Instance()->Truncate(path, newSize);
}
int wrap_utime(const char *path, struct utimbuf *ubuf) {
return ExampleFS::Instance()->Utime(path, ubuf);
}
int wrap_open(const char *path, struct fuse_file_info *fileInfo) {
return ExampleFS::Instance()->Open(path, fileInfo);
}
int wrap_read(const char *path, char *buf, size_t size, off_t offset, struct fuse_file_info *fileInfo) {
return ExampleFS::Instance()->Read(path, buf, size, offset, fileInfo);
}
int wrap_write(const char *path, const char *buf, size_t size, off_t offset, struct fuse_file_info *fileInfo) {
return ExampleFS::Instance()->Write(path, buf, size, offset, fileInfo);
}
int wrap_statfs(const char *path, struct statvfs *statInfo) {
return ExampleFS::Instance()->Statfs(path, statInfo);
}
int wrap_flush(const char *path, struct fuse_file_info *fileInfo) {
return ExampleFS::Instance()->Flush(path, fileInfo);
}
int wrap_release(const char *path, struct fuse_file_info *fileInfo) {
return ExampleFS::Instance()->Release(path, fileInfo);
}
int wrap_fsync(const char *path, int datasync, struct fuse_file_info *fi) {
return ExampleFS::Instance()->Fsync(path, datasync, fi);
}
int wrap_setxattr(const char *path, const char *name, const char *value, size_t size, int flags) {
return ExampleFS::Instance()->Setxattr(path, name, value, size, flags);
}
int wrap_getxattr(const char *path, const char *name, char *value, size_t size) {
return ExampleFS::Instance()->Getxattr(path, name, value, size);
}
int wrap_listxattr(const char *path, char *list, size_t size) {
return ExampleFS::Instance()->Listxattr(path, list, size);
}
int wrap_removexattr(const char *path, const char *name) {
return ExampleFS::Instance()->Removexattr(path, name);
}
int wrap_opendir(const char *path, struct fuse_file_info *fileInfo) {
return ExampleFS::Instance()->Opendir(path, fileInfo);
}
int wrap_readdir(const char *path, void *buf, fuse_fill_dir_t filler, off_t offset, struct fuse_file_info *fileInfo) {
return ExampleFS::Instance()->Readdir(path, buf, filler, offset, fileInfo);
}
int wrap_releasedir(const char *path, struct fuse_file_info *fileInfo) {
return ExampleFS::Instance()->Releasedir(path, fileInfo);
}
int wrap_fsyncdir(const char *path, int datasync, struct fuse_file_info *fileInfo) {
return ExampleFS::Instance()->Fsyncdir(path, datasync, fileInfo);
}
int wrap_init(struct fuse_conn_info *conn) {
return ExampleFS::Instance()->Init(conn);
}