mirror of https://github.com/trapexit/mergerfs.git
Antonio SJ Musumeci
3 years ago
35 changed files with 165 additions and 244 deletions
-
6src/fuse_chmod_policy_all.cpp
-
4src/fuse_chown_policy_all.hpp
-
36src/fuse_getattr_func.cpp
-
46src/fuse_getattr_func.hpp
-
41src/fuse_getattr_func_base.hpp
-
5src/fuse_ioctl_policy_all.cpp
-
2src/fuse_listxattr_policy.hpp
-
5src/fuse_mkdir_policy.hpp
-
10src/fuse_mknod_policy.hpp
-
2src/fuse_mknod_policy_base.hpp
-
1src/fuse_readlink_policy.hpp
-
2src/fuse_readlink_policy_base.hpp
-
2src/fuse_readlink_policy_factory.hpp
-
2src/fuse_readlink_policy_ff.hpp
-
1src/fuse_removexattr_policy.hpp
-
1src/fuse_rename_policy.hpp
-
13src/fuse_rmdir_policy_all.cpp
-
10src/fuse_rmdir_policy_all.hpp
-
9src/fuse_rmdir_policy_base.hpp
-
13src/fuse_rmdir_policy_factory.cpp
-
8src/fuse_rmdir_policy_factory.hpp
-
26src/fuse_setxattr_policy.hpp
-
18src/fuse_setxattr_policy_base.hpp
-
8src/fuse_setxattr_policy_factory.hpp
-
20src/fuse_symlink_policy.hpp
-
12src/fuse_symlink_policy_base.hpp
-
8src/fuse_symlink_policy_factory.hpp
-
20src/fuse_truncate_policy.hpp
-
12src/fuse_truncate_policy_all.hpp
-
11src/fuse_truncate_policy_base.hpp
-
12src/fuse_truncate_policy_factory.cpp
-
8src/fuse_truncate_policy_factory.hpp
-
18src/fuse_unlink_policy.hpp
-
9src/fuse_unlink_policy_base.hpp
-
8src/fuse_unlink_policy_factory.hpp
@ -1,36 +0,0 @@ |
|||
/*
|
|||
ISC License |
|||
|
|||
Copyright (c) 2022, Antonio SJ Musumeci <trapexit@spawn.link> |
|||
|
|||
Permission to use, copy, modify, and/or distribute this software for any |
|||
purpose with or without fee is hereby granted, provided that the above |
|||
copyright notice and this permission notice appear in all copies. |
|||
|
|||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
|||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
|||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
|||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
|||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
|||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
|||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
|||
*/ |
|||
|
|||
#include "fuse_getattr_func.hpp"
|
|||
#include "fuse_getattr_func_factory.hpp"
|
|||
|
|||
#include "state.hpp"
|
|||
|
|||
|
|||
FUSE::GETATTR::Func::Func(const toml::value &toml_) |
|||
{ |
|||
_getattr = FuncFactory(toml_); |
|||
} |
|||
|
|||
int |
|||
FUSE::GETATTR::Func::operator()(const gfs::path &fusepath_, |
|||
struct stat *st_, |
|||
fuse_timeouts_t *timeout_) |
|||
{ |
|||
return (*_getattr)(fusepath_,st_,timeout_); |
|||
} |
@ -1,46 +0,0 @@ |
|||
/*
|
|||
ISC License |
|||
|
|||
Copyright (c) 2022, Antonio SJ Musumeci <trapexit@spawn.link> |
|||
|
|||
Permission to use, copy, modify, and/or distribute this software for any |
|||
purpose with or without fee is hereby granted, provided that the above |
|||
copyright notice and this permission notice appear in all copies. |
|||
|
|||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
|||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
|||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
|||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
|||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
|||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
|||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
|||
*/ |
|||
|
|||
#pragma once
|
|||
|
|||
#include "from_toml.hpp"
|
|||
#include "fuse_getattr_func_base.hpp"
|
|||
|
|||
#include "fuse_timeouts.h"
|
|||
|
|||
#include <memory>
|
|||
|
|||
#include <sys/stat.h>
|
|||
|
|||
|
|||
namespace FUSE::GETATTR |
|||
{ |
|||
class Func |
|||
{ |
|||
public: |
|||
Func(const toml::value &); |
|||
|
|||
public: |
|||
int operator()(const gfs::path &fusepath, |
|||
struct stat *st, |
|||
fuse_timeouts_t *timeout); |
|||
|
|||
private: |
|||
FuncBase::Ptr _getattr; |
|||
}; |
|||
} |
@ -1,41 +0,0 @@ |
|||
/*
|
|||
ISC License |
|||
|
|||
Copyright (c) 2022, Antonio SJ Musumeci <trapexit@spawn.link> |
|||
|
|||
Permission to use, copy, modify, and/or distribute this software for any |
|||
purpose with or without fee is hereby granted, provided that the above |
|||
copyright notice and this permission notice appear in all copies. |
|||
|
|||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
|||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
|||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
|||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
|||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
|||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
|||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
|||
*/ |
|||
|
|||
#pragma once
|
|||
|
|||
#include "fs_path.hpp"
|
|||
|
|||
#include "fuse_timeouts.h"
|
|||
|
|||
#include <memory>
|
|||
|
|||
#include <sys/stat.h>
|
|||
|
|||
namespace FUSE::GETATTR |
|||
{ |
|||
class FuncBase |
|||
{ |
|||
public: |
|||
typedef std::shared_ptr<FuncBase> Ptr; |
|||
|
|||
public: |
|||
virtual int operator()(const gfs::path &fusepath, |
|||
struct stat *st, |
|||
fuse_timeouts_t *timeout) = 0; |
|||
}; |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue