mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
Add a simple webui config app
This commit is contained in:
parent
1290ab9708
commit
e12303a743
23 changed files with 46696 additions and 115 deletions
21
src/func.cpp
21
src/func.cpp
|
|
@ -22,10 +22,13 @@
|
|||
int
|
||||
Func::Base::Action::from_string(const std::string_view policyname_)
|
||||
{
|
||||
policy = Policies::Action::find(policyname_);
|
||||
if(!policy)
|
||||
auto new_policy = Policies::Action::find(policyname_);
|
||||
|
||||
if(!new_policy)
|
||||
return -EINVAL;
|
||||
|
||||
policy = new_policy;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -38,10 +41,13 @@ Func::Base::Action::to_string(void) const
|
|||
int
|
||||
Func::Base::Create::from_string(const std::string_view policyname_)
|
||||
{
|
||||
policy = Policies::Create::find(policyname_);
|
||||
if(!policy)
|
||||
auto new_policy = Policies::Create::find(policyname_);
|
||||
|
||||
if(!new_policy)
|
||||
return -EINVAL;
|
||||
|
||||
policy = new_policy;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -54,10 +60,13 @@ Func::Base::Create::to_string(void) const
|
|||
int
|
||||
Func::Base::Search::from_string(const std::string_view policyname_)
|
||||
{
|
||||
policy = Policies::Search::find(policyname_);
|
||||
if(!policy)
|
||||
auto new_policy = Policies::Search::find(policyname_);
|
||||
|
||||
if(!new_policy)
|
||||
return -EINVAL;
|
||||
|
||||
policy = new_policy;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue