mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-21 23:46:26 -05:00
remove statfs policy
This commit is contained in:
parent
29ed2bca01
commit
16fe0cf90c
9 changed files with 38 additions and 138 deletions
|
|
@ -254,53 +254,4 @@ namespace mergerfs
|
|||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
Policy::StatFS::StatFS(const Policy::StatFS::Type value)
|
||||
{
|
||||
*this = value;
|
||||
}
|
||||
|
||||
Policy::StatFS&
|
||||
Policy::StatFS::operator=(Policy::StatFS::Type value)
|
||||
{
|
||||
_str = toString(value);
|
||||
_value = fromString(_str);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
Policy::StatFS&
|
||||
Policy::StatFS::operator=(const std::string str)
|
||||
{
|
||||
_value = fromString(str);
|
||||
_str = toString(_value);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
Policy::StatFS::Type
|
||||
Policy::StatFS::fromString(const std::string str)
|
||||
{
|
||||
if(str == "susf")
|
||||
return Policy::StatFS::SumUsedSumFree;
|
||||
else if(str == "sumf")
|
||||
return Policy::StatFS::SumUsedMaxFree;
|
||||
|
||||
return Policy::StatFS::Invalid;
|
||||
}
|
||||
|
||||
std::string
|
||||
Policy::StatFS::toString(const Policy::StatFS::Type value)
|
||||
{
|
||||
switch(value)
|
||||
{
|
||||
case Policy::StatFS::SumUsedSumFree:
|
||||
return "susf";
|
||||
case Policy::StatFS::SumUsedMaxFree:
|
||||
return "sumf";
|
||||
case Policy::StatFS::Invalid:
|
||||
default:
|
||||
return "invalid";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue