mergerfs.cpp

This commit is contained in:
Antonio SJ Musumeci 2024-01-27 00:45:37 -06:00
parent b2e489e0c1
commit 3a936dc743

View File

@ -91,9 +91,14 @@
#include <string.h> #include <string.h>
namespace l {
static void get_fuse_operations(struct fuse_operations &ops_, namespace l
const bool nullrw_) { {
static
void
get_fuse_operations(struct fuse_operations &ops_,
const bool nullrw_)
{
ops_.access = FUSE::access; ops_.access = FUSE::access;
ops_.bmap = FUSE::bmap; ops_.bmap = FUSE::bmap;
ops_.chmod = FUSE::chmod; ops_.chmod = FUSE::chmod;
@ -123,8 +128,7 @@ static void get_fuse_operations(struct fuse_operations &ops_,
ops_.mknod = FUSE::mknod; ops_.mknod = FUSE::mknod;
ops_.open = FUSE::open; ops_.open = FUSE::open;
ops_.opendir = FUSE::opendir; ops_.opendir = FUSE::opendir;
ops_.poll = FUSE::poll; ops_.poll = FUSE::poll;;
;
ops_.prepare_hide = FUSE::prepare_hide; ops_.prepare_hide = FUSE::prepare_hide;
ops_.read = (nullrw_ ? FUSE::read_null : FUSE::read); ops_.read = (nullrw_ ? FUSE::read_null : FUSE::read);
ops_.readdir = FUSE::readdir; ops_.readdir = FUSE::readdir;
@ -292,13 +296,13 @@ static void get_fuse_operations(struct fuse_operations &ops_,
return rv; return rv;
} }
} // namespace l }
int int
main(int argc_, main(int argc_,
char **argv_) char **argv_)
{ {
auto data = toml::parse<preserve_comments>("config.toml"); auto data = toml::parse<toml::preserve_comments>("config.toml");
std::cout << data["branches"] << '\n'; std::cout << data["branches"] << '\n';
// Branches2 b(data["branches"]); // Branches2 b(data["branches"]);