branches: add per branch minfreespace w/ original value as default

example: /mnt/disk0=RW,1G:/mnt/disk1=RW,2G
This commit is contained in:
Antonio SJ Musumeci 2020-08-20 18:47:04 -04:00
parent 98c49b8001
commit fc3453932a
68 changed files with 3005 additions and 813 deletions

View file

@ -46,6 +46,25 @@ namespace str
return str::split(str_.c_str(),delimiter_,result_);
}
void
rsplit1(const string &str_,
const char delimiter_,
vector<string> *result_)
{
std::size_t off;
off = str_.rfind('=');
if(off == std::string::npos)
{
result_->push_back(str_);
}
else
{
result_->push_back(str_.substr(0,off));
result_->push_back(str_.substr(off+1));
}
}
void
splitkv(const string &str_,
const char delimiter_,