mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-29 11:26:44 -05:00
general cleanup, slight memory reduction
This commit is contained in:
parent
2d8fab534a
commit
1b26f4908e
53 changed files with 4600 additions and 3672 deletions
|
|
@ -49,12 +49,12 @@ namespace l
|
|||
namespace FUSE
|
||||
{
|
||||
ssize_t
|
||||
copy_file_range(struct fuse_file_info *ffi_in_,
|
||||
off_t offset_in_,
|
||||
struct fuse_file_info *ffi_out_,
|
||||
off_t offset_out_,
|
||||
size_t size_,
|
||||
int flags_)
|
||||
copy_file_range(const fuse_file_info_t *ffi_in_,
|
||||
off_t offset_in_,
|
||||
const fuse_file_info_t *ffi_out_,
|
||||
off_t offset_out_,
|
||||
size_t size_,
|
||||
int flags_)
|
||||
{
|
||||
FileInfo *fi_in = reinterpret_cast<FileInfo*>(ffi_in_->fh);
|
||||
FileInfo *fi_out = reinterpret_cast<FileInfo*>(ffi_out_->fh);
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@
|
|||
namespace FUSE
|
||||
{
|
||||
ssize_t
|
||||
copy_file_range(struct fuse_file_info *ffi_in,
|
||||
off_t offset_in,
|
||||
struct fuse_file_info *ffi_out,
|
||||
off_t offset_out,
|
||||
size_t size,
|
||||
int flags);
|
||||
copy_file_range(const fuse_file_info_t *ffi_in,
|
||||
off_t offset_in,
|
||||
const fuse_file_info_t *ffi_out,
|
||||
off_t offset_out,
|
||||
size_t size,
|
||||
int flags);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@ namespace l
|
|||
|
||||
static
|
||||
void
|
||||
config_to_ffi_flags(const Config &config_,
|
||||
fuse_file_info *ffi_)
|
||||
config_to_ffi_flags(const Config &config_,
|
||||
fuse_file_info_t *ffi_)
|
||||
{
|
||||
switch(config_.cache_files)
|
||||
{
|
||||
|
|
@ -166,9 +166,9 @@ namespace l
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
create(const char *fusepath_,
|
||||
mode_t mode_,
|
||||
fuse_file_info *ffi_)
|
||||
create(const char *fusepath_,
|
||||
mode_t mode_,
|
||||
fuse_file_info_t *ffi_)
|
||||
{
|
||||
const fuse_context *fc = fuse_get_context();
|
||||
const Config &config = Config::ro();
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
create(const char *fusepath,
|
||||
mode_t mode,
|
||||
fuse_file_info *ffi);
|
||||
create(const char *fusepath,
|
||||
mode_t mode,
|
||||
fuse_file_info_t *ffi);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,10 +40,10 @@ namespace l
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
fallocate(int mode_,
|
||||
off_t offset_,
|
||||
off_t len_,
|
||||
fuse_file_info *ffi_)
|
||||
fallocate(const fuse_file_info_t *ffi_,
|
||||
int mode_,
|
||||
off_t offset_,
|
||||
off_t len_)
|
||||
{
|
||||
FileInfo *fi = reinterpret_cast<FileInfo*>(ffi_->fh);
|
||||
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
fallocate(int mode,
|
||||
off_t offset,
|
||||
off_t len,
|
||||
fuse_file_info *ffi);
|
||||
fallocate(const fuse_file_info_t *ffi,
|
||||
int mode,
|
||||
off_t offset,
|
||||
off_t len);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,8 +40,8 @@ namespace l
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
fchmod(const struct fuse_file_info *ffi_,
|
||||
const mode_t mode_)
|
||||
fchmod(const fuse_file_info_t *ffi_,
|
||||
const mode_t mode_)
|
||||
{
|
||||
FileInfo *fi = reinterpret_cast<FileInfo*>(ffi_->fh);
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,6 @@
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
fchmod(const fuse_file_info *ffi,
|
||||
const mode_t mode);
|
||||
fchmod(const fuse_file_info_t *ffi,
|
||||
const mode_t mode);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,9 +43,9 @@ namespace l
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
fchown(const struct fuse_file_info *ffi_,
|
||||
const uid_t uid_,
|
||||
const gid_t gid_)
|
||||
fchown(const fuse_file_info_t *ffi_,
|
||||
const uid_t uid_,
|
||||
const gid_t gid_)
|
||||
{
|
||||
FileInfo *fi = reinterpret_cast<FileInfo*>(ffi_->fh);
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
fchown(const fuse_file_info *ffi,
|
||||
uid_t uid,
|
||||
gid_t gid);
|
||||
fchown(const fuse_file_info_t *ffi,
|
||||
uid_t uid,
|
||||
gid_t gid);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,9 +45,9 @@ namespace l
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
fgetattr(struct stat *st_,
|
||||
fuse_file_info *ffi_,
|
||||
fuse_timeouts_t *timeout_)
|
||||
fgetattr(const fuse_file_info_t *ffi_,
|
||||
struct stat *st_,
|
||||
fuse_timeouts_t *timeout_)
|
||||
{
|
||||
int rv;
|
||||
const Config &config = Config::ro();
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
fgetattr(struct stat *st,
|
||||
fuse_file_info *ffi,
|
||||
fuse_timeouts_t *timeout);
|
||||
fgetattr(const fuse_file_info_t *ffi,
|
||||
struct stat *st,
|
||||
fuse_timeouts_t *timeout);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,9 +38,8 @@ namespace l
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
flock(const char *fusepath_,
|
||||
fuse_file_info *ffi_,
|
||||
int op_)
|
||||
flock(const fuse_file_info_t *ffi_,
|
||||
int op_)
|
||||
{
|
||||
FileInfo* fi = reinterpret_cast<FileInfo*>(ffi_->fh);
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
flock(const char *fusepath,
|
||||
fuse_file_info *ffi,
|
||||
int op);
|
||||
flock(const fuse_file_info_t *ffi,
|
||||
int op);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace l
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
flush(fuse_file_info *ffi_)
|
||||
flush(const fuse_file_info_t *ffi_)
|
||||
{
|
||||
FileInfo *fi = reinterpret_cast<FileInfo*>(ffi_->fh);
|
||||
|
||||
|
|
|
|||
|
|
@ -21,5 +21,5 @@
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
flush(fuse_file_info *ffi);
|
||||
flush(const fuse_file_info_t *ffi);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,8 +44,8 @@ namespace l
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
fsync(int isdatasync_,
|
||||
fuse_file_info *ffi_)
|
||||
fsync(const fuse_file_info_t *ffi_,
|
||||
int isdatasync_)
|
||||
{
|
||||
FileInfo *fi = reinterpret_cast<FileInfo*>(ffi_->fh);
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
fsync(int isdatasync,
|
||||
fuse_file_info *ffi);
|
||||
fsync(const fuse_file_info_t *ffi,
|
||||
int isdatasync);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,8 +42,8 @@ namespace l
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
fsyncdir(int isdatasync_,
|
||||
fuse_file_info *ffi_)
|
||||
fsyncdir(const fuse_file_info_t *ffi_,
|
||||
int isdatasync_)
|
||||
{
|
||||
DirInfo *di = reinterpret_cast<DirInfo*>(ffi_->fh);
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,6 @@
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
fsyncdir(int isdatasync,
|
||||
fuse_file_info *ffi);
|
||||
fsyncdir(const fuse_file_info_t *ffi,
|
||||
int isdatasync);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,8 +38,8 @@ namespace l
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
ftruncate(off_t size_,
|
||||
fuse_file_info *ffi_)
|
||||
ftruncate(const fuse_file_info_t *ffi_,
|
||||
off_t size_)
|
||||
{
|
||||
FileInfo *fi = reinterpret_cast<FileInfo*>(ffi_->fh);
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,6 @@
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
ftruncate(off_t size,
|
||||
fuse_file_info *ffi);
|
||||
ftruncate(const fuse_file_info_t *ffi,
|
||||
off_t size);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,8 +42,8 @@ namespace l
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
futimens(const struct fuse_file_info *ffi_,
|
||||
const struct timespec ts_[2])
|
||||
futimens(const fuse_file_info_t *ffi_,
|
||||
const struct timespec ts_[2])
|
||||
{
|
||||
FileInfo *fi = reinterpret_cast<FileInfo*>(ffi_->fh);
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,6 @@
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
futimens(const fuse_file_info *ffi,
|
||||
const timespec ts[2]);
|
||||
futimens(const fuse_file_info_t *ffi,
|
||||
const timespec ts[2]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -116,10 +116,10 @@ namespace l
|
|||
|
||||
static
|
||||
int
|
||||
ioctl_file(fuse_file_info *ffi_,
|
||||
const uint32_t cmd_,
|
||||
void *data_,
|
||||
uint32_t *out_bufsz_)
|
||||
ioctl_file(const fuse_file_info_t *ffi_,
|
||||
const uint32_t cmd_,
|
||||
void *data_,
|
||||
uint32_t *out_bufsz_)
|
||||
{
|
||||
FileInfo *fi = reinterpret_cast<FileInfo*>(ffi_->fh);
|
||||
const fuse_context *fc = fuse_get_context();
|
||||
|
|
@ -165,10 +165,10 @@ namespace l
|
|||
|
||||
static
|
||||
int
|
||||
ioctl_dir(fuse_file_info *ffi_,
|
||||
const uint32_t cmd_,
|
||||
void *data_,
|
||||
uint32_t *out_bufsz_)
|
||||
ioctl_dir(const fuse_file_info_t *ffi_,
|
||||
const uint32_t cmd_,
|
||||
void *data_,
|
||||
uint32_t *out_bufsz_)
|
||||
{
|
||||
DirInfo *di = reinterpret_cast<DirInfo*>(ffi_->fh);
|
||||
const fuse_context *fc = fuse_get_context();
|
||||
|
|
@ -270,8 +270,8 @@ namespace l
|
|||
|
||||
static
|
||||
int
|
||||
file_basepath(fuse_file_info *ffi_,
|
||||
void *data_)
|
||||
file_basepath(const fuse_file_info_t *ffi_,
|
||||
void *data_)
|
||||
{
|
||||
const Config &config = Config::ro();
|
||||
std::string &fusepath = reinterpret_cast<FH*>(ffi_->fh)->fusepath;
|
||||
|
|
@ -284,8 +284,8 @@ namespace l
|
|||
|
||||
static
|
||||
int
|
||||
file_relpath(fuse_file_info *ffi_,
|
||||
void *data_)
|
||||
file_relpath(const fuse_file_info_t *ffi_,
|
||||
void *data_)
|
||||
{
|
||||
std::string &fusepath = reinterpret_cast<FH*>(ffi_->fh)->fusepath;
|
||||
|
||||
|
|
@ -314,8 +314,8 @@ namespace l
|
|||
|
||||
static
|
||||
int
|
||||
file_fullpath(fuse_file_info *ffi_,
|
||||
void *data_)
|
||||
file_fullpath(const fuse_file_info_t *ffi_,
|
||||
void *data_)
|
||||
{
|
||||
const Config &config = Config::ro();
|
||||
std::string &fusepath = reinterpret_cast<FH*>(ffi_->fh)->fusepath;
|
||||
|
|
@ -328,8 +328,8 @@ namespace l
|
|||
|
||||
static
|
||||
int
|
||||
file_allpaths(fuse_file_info *ffi_,
|
||||
void *data_)
|
||||
file_allpaths(const fuse_file_info_t *ffi_,
|
||||
void *data_)
|
||||
{
|
||||
string concated;
|
||||
vector<string> paths;
|
||||
|
|
@ -348,8 +348,8 @@ namespace l
|
|||
|
||||
static
|
||||
int
|
||||
file_info(fuse_file_info *ffi_,
|
||||
void *data_)
|
||||
file_info(const fuse_file_info_t *ffi_,
|
||||
void *data_)
|
||||
{
|
||||
char *key = (char*)data_;
|
||||
|
||||
|
|
@ -369,12 +369,12 @@ namespace l
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
ioctl(unsigned long cmd_,
|
||||
void *arg_,
|
||||
fuse_file_info *ffi_,
|
||||
unsigned int flags_,
|
||||
void *data_,
|
||||
uint32_t *out_bufsz_)
|
||||
ioctl(const fuse_file_info_t *ffi_,
|
||||
unsigned long cmd_,
|
||||
void *arg_,
|
||||
unsigned int flags_,
|
||||
void *data_,
|
||||
uint32_t *out_bufsz_)
|
||||
{
|
||||
switch(cmd_)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -21,10 +21,10 @@
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
ioctl(unsigned long cmd,
|
||||
void *arg,
|
||||
fuse_file_info *ffi,
|
||||
unsigned int flags,
|
||||
void *data,
|
||||
uint32_t *out_bufsz);
|
||||
ioctl(const fuse_file_info_t *ffi,
|
||||
unsigned long cmd,
|
||||
void *arg,
|
||||
unsigned int flags,
|
||||
void *data,
|
||||
uint32_t *out_bufsz);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,8 +117,8 @@ namespace l
|
|||
|
||||
static
|
||||
void
|
||||
config_to_ffi_flags(const Config &config_,
|
||||
fuse_file_info *ffi_)
|
||||
config_to_ffi_flags(const Config &config_,
|
||||
fuse_file_info_t *ffi_)
|
||||
{
|
||||
switch(config_.cache_files)
|
||||
{
|
||||
|
|
@ -203,8 +203,8 @@ namespace l
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
open(const char *fusepath_,
|
||||
fuse_file_info *ffi_)
|
||||
open(const char *fusepath_,
|
||||
fuse_file_info_t *ffi_)
|
||||
{
|
||||
const fuse_context *fc = fuse_get_context();
|
||||
const Config &config = Config::ro();
|
||||
|
|
|
|||
|
|
@ -21,6 +21,6 @@
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
open(const char *fusepath,
|
||||
fuse_file_info *ffi);
|
||||
open(const char *fusepath,
|
||||
fuse_file_info_t *ffi);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,8 +22,8 @@
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
opendir(const char *fusepath_,
|
||||
fuse_file_info *ffi_)
|
||||
opendir(const char *fusepath_,
|
||||
fuse_file_info_t *ffi_)
|
||||
{
|
||||
const Config &config = Config::ro();
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,6 @@
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
opendir(const char *fusepath,
|
||||
fuse_file_info *ffi);
|
||||
opendir(const char *fusepath,
|
||||
fuse_file_info_t *ffi);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ namespace FUSE
|
|||
uint64_t *fh_)
|
||||
{
|
||||
int rv;
|
||||
struct fuse_file_info ffi = {0};
|
||||
fuse_file_info_t ffi = {0};
|
||||
|
||||
ffi.flags = O_RDONLY|O_NOFOLLOW;
|
||||
rv = FUSE::open(fusepath_,&ffi);
|
||||
|
|
|
|||
|
|
@ -62,10 +62,10 @@ namespace l
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
read(char *buf_,
|
||||
size_t count_,
|
||||
off_t offset_,
|
||||
fuse_file_info *ffi_)
|
||||
read(const fuse_file_info_t *ffi_,
|
||||
char *buf_,
|
||||
size_t count_,
|
||||
off_t offset_)
|
||||
{
|
||||
FileInfo *fi;
|
||||
|
||||
|
|
@ -77,11 +77,10 @@ namespace FUSE
|
|||
}
|
||||
|
||||
int
|
||||
read_null(char *buf_,
|
||||
size_t count_,
|
||||
off_t offset_,
|
||||
fuse_file_info *ffi_)
|
||||
|
||||
read_null(const fuse_file_info_t *ffi_,
|
||||
char *buf_,
|
||||
size_t count_,
|
||||
off_t offset_)
|
||||
{
|
||||
return count_;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,14 +21,14 @@
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
read(char *buf,
|
||||
size_t count,
|
||||
off_t offset,
|
||||
fuse_file_info *ffi);
|
||||
read(const fuse_file_info_t *ffi,
|
||||
char *buf,
|
||||
size_t count,
|
||||
off_t offset);
|
||||
|
||||
int
|
||||
read_null(char *buf,
|
||||
size_t count,
|
||||
off_t offset,
|
||||
fuse_file_info *ffi);
|
||||
read_null(const fuse_file_info_t *ffi,
|
||||
char *buf,
|
||||
size_t count,
|
||||
off_t offset);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,10 +54,10 @@ namespace l
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
read_buf(fuse_bufvec **bufp_,
|
||||
size_t size_,
|
||||
off_t offset_,
|
||||
fuse_file_info *ffi_)
|
||||
read_buf(const fuse_file_info_t *ffi_,
|
||||
fuse_bufvec **bufp_,
|
||||
size_t size_,
|
||||
off_t offset_)
|
||||
{
|
||||
FileInfo *fi = reinterpret_cast<FileInfo*>(ffi_->fh);
|
||||
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
read_buf(struct fuse_bufvec **buf,
|
||||
size_t size,
|
||||
off_t offset,
|
||||
fuse_file_info *ffi);
|
||||
read_buf(const fuse_file_info_t *ffi,
|
||||
struct fuse_bufvec **buf,
|
||||
size_t size,
|
||||
off_t offset);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,8 +29,8 @@
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
readdir(fuse_file_info *ffi_,
|
||||
fuse_dirents_t *buf_)
|
||||
readdir(const fuse_file_info_t *ffi_,
|
||||
fuse_dirents_t *buf_)
|
||||
{
|
||||
DirInfo *di = reinterpret_cast<DirInfo*>(ffi_->fh);
|
||||
const fuse_context *fc = fuse_get_context();
|
||||
|
|
|
|||
|
|
@ -21,6 +21,6 @@
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
readdir(fuse_file_info *ffi,
|
||||
fuse_dirents_t *buf);
|
||||
readdir(const fuse_file_info_t *ffi,
|
||||
fuse_dirents_t *buf);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,13 +29,13 @@
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
readdir_plus(fuse_file_info *ffi_,
|
||||
fuse_dirents_t *buf_)
|
||||
readdir_plus(const fuse_file_info_t *ffi_,
|
||||
fuse_dirents_t *buf_)
|
||||
{
|
||||
DirInfo *di = reinterpret_cast<DirInfo*>(ffi_->fh);
|
||||
const fuse_context *fc = fuse_get_context();
|
||||
const Config &config = Config::ro();
|
||||
const ugid::Set ugid(fc->uid,fc->gid);
|
||||
DirInfo *di = reinterpret_cast<DirInfo*>(ffi_->fh);
|
||||
const fuse_context *fc = fuse_get_context();
|
||||
const Config &config = Config::ro();
|
||||
const ugid::Set ugid(fc->uid,fc->gid);
|
||||
|
||||
switch(config.readdir)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -21,6 +21,6 @@
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
readdir_plus(fuse_file_info *ffi,
|
||||
fuse_dirents_t *buf);
|
||||
readdir_plus(const fuse_file_info_t *ffi,
|
||||
fuse_dirents_t *buf);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ namespace l
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
release(fuse_file_info *ffi_)
|
||||
release(const fuse_file_info_t *ffi_)
|
||||
{
|
||||
const Config &config = Config::ro();
|
||||
FileInfo *fi = reinterpret_cast<FileInfo*>(ffi_->fh);
|
||||
|
|
|
|||
|
|
@ -21,5 +21,5 @@
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
release(fuse_file_info *ffi);
|
||||
release(const fuse_file_info_t *ffi);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ namespace l
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
releasedir(fuse_file_info *ffi_)
|
||||
releasedir(const fuse_file_info_t *ffi_)
|
||||
{
|
||||
DirInfo *di = reinterpret_cast<DirInfo*>(ffi_->fh);
|
||||
|
||||
|
|
|
|||
|
|
@ -21,5 +21,5 @@
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
releasedir(fuse_file_info *ffi);
|
||||
releasedir(const fuse_file_info_t *ffi);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,11 +102,11 @@ namespace l
|
|||
|
||||
static
|
||||
int
|
||||
write(WriteFunc func_,
|
||||
const char *buf_,
|
||||
const size_t count_,
|
||||
const off_t offset_,
|
||||
fuse_file_info *ffi_)
|
||||
write(const fuse_file_info_t *ffi_,
|
||||
WriteFunc func_,
|
||||
const char *buf_,
|
||||
const size_t count_,
|
||||
const off_t offset_)
|
||||
{
|
||||
int rv;
|
||||
FileInfo* fi;
|
||||
|
|
@ -124,10 +124,10 @@ namespace l
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
write(const char *buf_,
|
||||
size_t count_,
|
||||
off_t offset_,
|
||||
fuse_file_info *ffi_)
|
||||
write(const fuse_file_info_t *ffi_,
|
||||
const char *buf_,
|
||||
size_t count_,
|
||||
off_t offset_)
|
||||
{
|
||||
WriteFunc wf;
|
||||
|
||||
|
|
@ -135,14 +135,14 @@ namespace FUSE
|
|||
l::write_direct_io :
|
||||
l::write_regular);
|
||||
|
||||
return l::write(wf,buf_,count_,offset_,ffi_);
|
||||
return l::write(ffi_,wf,buf_,count_,offset_);
|
||||
}
|
||||
|
||||
int
|
||||
write_null(const char *buf_,
|
||||
size_t count_,
|
||||
off_t offset_,
|
||||
fuse_file_info *ffi_)
|
||||
write_null(const fuse_file_info_t *ffi_,
|
||||
const char *buf_,
|
||||
size_t count_,
|
||||
off_t offset_)
|
||||
{
|
||||
return count_;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,14 +21,14 @@
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
write(const char *buf,
|
||||
size_t count,
|
||||
off_t offset,
|
||||
fuse_file_info *ffi);
|
||||
write(const fuse_file_info_t *ffi,
|
||||
const char *buf,
|
||||
size_t count,
|
||||
off_t offset);
|
||||
|
||||
int
|
||||
write_null(const char *buf,
|
||||
size_t count,
|
||||
off_t offset,
|
||||
fuse_file_info *ffi);
|
||||
write_null(const fuse_file_info_t *ffi,
|
||||
const char *buf,
|
||||
size_t count,
|
||||
off_t offset);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,9 +86,9 @@ namespace l
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
write_buf(fuse_bufvec *src_,
|
||||
off_t offset_,
|
||||
fuse_file_info *ffi_)
|
||||
write_buf(const fuse_file_info_t *ffi_,
|
||||
fuse_bufvec *src_,
|
||||
off_t offset_)
|
||||
{
|
||||
int rv;
|
||||
FileInfo *fi = reinterpret_cast<FileInfo*>(ffi_->fh);
|
||||
|
|
@ -101,9 +101,9 @@ namespace FUSE
|
|||
}
|
||||
|
||||
int
|
||||
write_buf_null(fuse_bufvec *src_,
|
||||
off_t offset_,
|
||||
fuse_file_info *ffi_)
|
||||
write_buf_null(const fuse_file_info_t *ffi_,
|
||||
fuse_bufvec *src_,
|
||||
off_t offset_)
|
||||
{
|
||||
return src_->buf[0].size;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,12 +23,12 @@
|
|||
namespace FUSE
|
||||
{
|
||||
int
|
||||
write_buf(struct fuse_bufvec *buf,
|
||||
off_t offset,
|
||||
fuse_file_info *ffi);
|
||||
write_buf(const fuse_file_info_t *ffi,
|
||||
struct fuse_bufvec *buf,
|
||||
off_t offset);
|
||||
|
||||
int
|
||||
write_buf_null(struct fuse_bufvec *buf,
|
||||
off_t offset,
|
||||
fuse_file_info *ffi);
|
||||
write_buf_null(const fuse_file_info_t *ffi,
|
||||
struct fuse_bufvec *buf,
|
||||
off_t offset);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue