add user.mergerfs.allpaths and user.mergerfs.relpath to getxattr

This commit is contained in:
Antonio SJ Musumeci 2015-02-07 18:27:47 -05:00
parent 2e95c6e78e
commit d30cae217b
4 changed files with 78 additions and 7 deletions

View file

@ -162,6 +162,27 @@ namespace fs
fusepath);
}
void
findallfiles(const vector<string> &srcmounts,
const string &fusepath,
vector<string> &paths)
{
for(vector<string>::const_iterator
iter = srcmounts.begin(), eiter = srcmounts.end();
iter != eiter;
++iter)
{
int rv;
string fullpath;
struct stat st;
fullpath = fs::make_path(*iter,fusepath);
rv = ::lstat(fullpath.c_str(),&st);
if(rv == 0)
paths.push_back(fullpath);
}
}
int
listxattr(const string &path,
vector<char> &attrs)