mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-21 07:26:28 -05:00
rework policy code
This commit is contained in:
parent
345d0bbdc4
commit
aab90b0503
35 changed files with 983 additions and 991 deletions
|
|
@ -36,9 +36,16 @@ namespace mergerfs
|
|||
namespace config
|
||||
{
|
||||
Config::Config()
|
||||
: controlfile("/.mergerfs"),
|
||||
: action(policies[0]),
|
||||
create(policies[1]),
|
||||
search(policies[2]),
|
||||
controlfile("/.mergerfs"),
|
||||
testmode(false)
|
||||
{
|
||||
action = &Policy::ff;
|
||||
create = &Policy::epmfs;
|
||||
search = &Policy::ff;
|
||||
|
||||
time_t now = time(NULL);
|
||||
|
||||
controlfilestat.st_dev = 0;
|
||||
|
|
@ -61,9 +68,9 @@ namespace mergerfs
|
|||
{
|
||||
std::stringstream ss;
|
||||
|
||||
ss << "action=" << policy.action.str() << std::endl
|
||||
<< "create=" << policy.create.str() << std::endl
|
||||
<< "search=" << policy.search.str() << std::endl;
|
||||
ss << "action=" << (std::string)*action << std::endl
|
||||
<< "create=" << (std::string)*create << std::endl
|
||||
<< "search=" << (std::string)*search << std::endl;
|
||||
|
||||
return ss.str();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue