mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-25 17:36:25 -05:00
rename NW (no write) to NC (no create)
This commit is contained in:
parent
1195e66a8a
commit
7524e57262
14 changed files with 21 additions and 21 deletions
|
|
@ -35,10 +35,10 @@ Branch::ro(void) const
|
|||
}
|
||||
|
||||
bool
|
||||
Branch::ro_or_nw(void) const
|
||||
Branch::ro_or_nc(void) const
|
||||
{
|
||||
return ((mode == Branch::RO) ||
|
||||
(mode == Branch::NW));
|
||||
(mode == Branch::NC));
|
||||
}
|
||||
|
||||
string
|
||||
|
|
@ -64,8 +64,8 @@ Branches::to_string(const bool mode_) const
|
|||
case Branch::RO:
|
||||
tmp += "RO";
|
||||
break;
|
||||
case Branch::NW:
|
||||
tmp += "NW";
|
||||
case Branch::NC:
|
||||
tmp += "NC";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -105,8 +105,8 @@ parse(const string &str_,
|
|||
branch.mode = Branch::RO;
|
||||
else if(str::ends_with(str,"=RW"))
|
||||
branch.mode = Branch::RW;
|
||||
else if(str::ends_with(str,"=NW"))
|
||||
branch.mode = Branch::NW;
|
||||
else if(str::ends_with(str,"=NC"))
|
||||
branch.mode = Branch::NC;
|
||||
|
||||
if(branch.mode != Branch::INVALID)
|
||||
str.resize(str.size() - 3);
|
||||
|
|
|
|||
|
|
@ -28,14 +28,14 @@ struct Branch
|
|||
INVALID,
|
||||
RO,
|
||||
RW,
|
||||
NW
|
||||
NC
|
||||
};
|
||||
|
||||
Mode mode;
|
||||
std::string path;
|
||||
|
||||
bool ro(void) const;
|
||||
bool ro_or_nw(void) const;
|
||||
bool ro_or_nc(void) const;
|
||||
};
|
||||
|
||||
class Branches : public std::vector<Branch>
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ namespace all
|
|||
{
|
||||
branch = &branches_[i];
|
||||
|
||||
if(branch->ro_or_nw())
|
||||
if(branch->ro_or_nc())
|
||||
error_and_continue(error,EROFS);
|
||||
rv = fs::info(&branch->path,&info);
|
||||
if(rv == -1)
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ namespace epall
|
|||
|
||||
if(!fs::exists(branch->path,fusepath))
|
||||
error_and_continue(error,ENOENT);
|
||||
if(branch->ro_or_nw())
|
||||
if(branch->ro_or_nc())
|
||||
error_and_continue(error,EROFS);
|
||||
rv = fs::info(&branch->path,&info);
|
||||
if(rv == -1)
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ namespace epff
|
|||
|
||||
if(!fs::exists(branch->path,fusepath))
|
||||
error_and_continue(error,ENOENT);
|
||||
if(branch->ro_or_nw())
|
||||
if(branch->ro_or_nc())
|
||||
error_and_continue(error,EROFS);
|
||||
rv = fs::info(&branch->path,&info);
|
||||
if(rv == -1)
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ namespace eplfs
|
|||
|
||||
if(!fs::exists(branch->path,fusepath))
|
||||
error_and_continue(error,ENOENT);
|
||||
if(branch->ro_or_nw())
|
||||
if(branch->ro_or_nc())
|
||||
error_and_continue(error,EROFS);
|
||||
rv = fs::info(&branch->path,&info);
|
||||
if(rv == -1)
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ namespace eplus
|
|||
|
||||
if(!fs::exists(branch->path,fusepath))
|
||||
error_and_continue(error,ENOENT);
|
||||
if(branch->ro_or_nw())
|
||||
if(branch->ro_or_nc())
|
||||
error_and_continue(error,EROFS);
|
||||
rv = fs::info(&branch->path,&info);
|
||||
if(rv == -1)
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ namespace epmfs
|
|||
|
||||
if(!fs::exists(branch->path,fusepath))
|
||||
error_and_continue(error,ENOENT);
|
||||
if(branch->ro_or_nw())
|
||||
if(branch->ro_or_nc())
|
||||
error_and_continue(error,EROFS);
|
||||
rv = fs::info(&branch->path,&info);
|
||||
if(rv == -1)
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ namespace ff
|
|||
{
|
||||
branch = &branches_[i];
|
||||
|
||||
if(branch->ro_or_nw())
|
||||
if(branch->ro_or_nc())
|
||||
error_and_continue(error,EROFS);
|
||||
rv = fs::info(&branch->path,&info);
|
||||
if(rv == -1)
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ namespace lfs
|
|||
{
|
||||
branch = &branches_[i];
|
||||
|
||||
if(branch->ro_or_nw())
|
||||
if(branch->ro_or_nc())
|
||||
error_and_continue(error,EROFS);
|
||||
rv = fs::info(&branch->path,&info);
|
||||
if(rv == -1)
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ namespace lus
|
|||
{
|
||||
branch = &branches_[i];
|
||||
|
||||
if(branch->ro_or_nw())
|
||||
if(branch->ro_or_nc())
|
||||
error_and_continue(error,EROFS);
|
||||
rv = fs::info(&branch->path,&info);
|
||||
if(rv == -1)
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ namespace mfs
|
|||
{
|
||||
branch = &branches_[i];
|
||||
|
||||
if(branch->ro_or_nw())
|
||||
if(branch->ro_or_nc())
|
||||
error_and_continue(error,EROFS);
|
||||
rv = fs::info(&branch->path,&info);
|
||||
if(rv == -1)
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ namespace newest
|
|||
|
||||
if(!fs::exists(branch->path,fusepath,st))
|
||||
error_and_continue(error,ENOENT);
|
||||
if(branch->ro_or_nw())
|
||||
if(branch->ro_or_nc())
|
||||
error_and_continue(error,EROFS);
|
||||
if(st.st_mtime < newest)
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue