mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
add user.mergerfs.version xattr
This commit is contained in:
parent
adf983c8c3
commit
b22528bac4
3 changed files with 21 additions and 3 deletions
|
|
@ -40,6 +40,7 @@
|
|||
#include "rwlock.hpp"
|
||||
#include "xattr.hpp"
|
||||
#include "str.hpp"
|
||||
#include "version.hpp"
|
||||
|
||||
using std::string;
|
||||
using std::vector;
|
||||
|
|
@ -134,6 +135,13 @@ _getxattr_controlfile_policies(const Config &config,
|
|||
attrvalue += ',' + (string)Policy::policies[i];
|
||||
}
|
||||
|
||||
static
|
||||
void
|
||||
_getxattr_controlfile_version(string &attrvalue)
|
||||
{
|
||||
attrvalue = MERGERFS_VERSION;
|
||||
}
|
||||
|
||||
static
|
||||
int
|
||||
_getxattr_controlfile(const Config &config,
|
||||
|
|
@ -158,6 +166,8 @@ _getxattr_controlfile(const Config &config,
|
|||
_getxattr_controlfile_minfreespace(config,attrvalue);
|
||||
else if(attr[2] == "policies")
|
||||
_getxattr_controlfile_policies(config,attrvalue);
|
||||
else if(attr[2] == "version")
|
||||
_getxattr_controlfile_version(attrvalue);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue