Rework policies to return branches rather than path strings

This commit is contained in:
trapexit 2025-05-17 16:35:18 -05:00 • committed by GitHub
parent 7e084ea7db
commit 86b50d2d4e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
86 changed files with 1259 additions and 3088 deletions

View file

@ -56,20 +56,20 @@ namespace l
static
int
listxattr(const Policy::Search &searchFunc_,
const Branches &branches_,
const Branches &ibranches_,
const char *fusepath_,
char *list_,
const size_t size_)
{
int rv;
string fullpath;
StrVec basepaths;
std::string fullpath;
std::vector<Branch*> obranches;
rv = searchFunc_(branches_,fusepath_,&basepaths);
rv = searchFunc_(ibranches_,fusepath_,obranches);
if(rv == -1)
return -errno;
fullpath = fs::path::make(basepaths[0],fusepath_);
fullpath = fs::path::make(obranches[0]->path,fusepath_);
rv = fs::llistxattr(fullpath,list_,size_);