mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
Error when given invalid policy names
This commit is contained in:
parent
faadeb75e0
commit
46ce28b149
5 changed files with 30 additions and 6 deletions
|
|
@ -23,6 +23,8 @@ int
|
|||
Func::Base::Action::from_string(const std::string &policyname_)
|
||||
{
|
||||
policy = Policies::Action::find(policyname_);
|
||||
if(!policy)
|
||||
return -EINVAL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -37,6 +39,8 @@ int
|
|||
Func::Base::Create::from_string(const std::string &policyname_)
|
||||
{
|
||||
policy = Policies::Create::find(policyname_);
|
||||
if(!policy)
|
||||
return -EINVAL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -51,6 +55,8 @@ int
|
|||
Func::Base::Search::from_string(const std::string &policyname_)
|
||||
{
|
||||
policy = Policies::Search::find(policyname_);
|
||||
if(!policy)
|
||||
return -EINVAL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue