cleanup function signatures and definitions

This commit is contained in:
Antonio SJ Musumeci 2020-08-16 18:22:25 -04:00
parent 6cc6524997
commit ec15872a1f
112 changed files with 743 additions and 820 deletions

View file

@ -35,8 +35,8 @@ namespace lus
static
int
create(const Branches &branches_,
const uint64_t minfreespace,
vector<string> *paths)
const uint64_t minfreespace_,
vector<string> *paths_)
{
rwlock::ReadGuard guard(&branches_.lock);
@ -56,12 +56,12 @@ namespace lus
if(branch->ro_or_nc())
error_and_continue(error,EROFS);
rv = fs::info(&branch->path,&info);
rv = fs::info(branch->path,&info);
if(rv == -1)
error_and_continue(error,ENOENT);
if(info.readonly)
error_and_continue(error,EROFS);
if(info.spaceavail < minfreespace)
if(info.spaceavail < minfreespace_)
error_and_continue(error,ENOSPC);
if(info.spaceused >= lus)
continue;
@ -73,21 +73,21 @@ namespace lus
if(lusbasepath == NULL)
return (errno=error,-1);
paths->push_back(*lusbasepath);
paths_->push_back(*lusbasepath);
return 0;
}
}
int
Policy::Func::lus(const Category type,
Policy::Func::lus(const Category type_,
const Branches &branches_,
const char *fusepath,
const uint64_t minfreespace,
vector<string> *paths)
const char *fusepath_,
const uint64_t minfreespace_,
vector<string> *paths_)
{
if(type == Category::CREATE)
return lus::create(branches_,minfreespace,paths);
if(type_ == Category::CREATE)
return lus::create(branches_,minfreespace_,paths_);
return Policy::Func::eplus(type,branches_,fusepath,minfreespace,paths);
return Policy::Func::eplus(type_,branches_,fusepath_,minfreespace_,paths_);
}