remove statfs policy

This commit is contained in:
Antonio SJ Musumeci 2014-05-23 07:28:05 -04:00
parent 29ed2bca01
commit 16fe0cf90c
9 changed files with 38 additions and 138 deletions

View file

@ -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";
}
}
}