mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-25 01:16:30 -05:00
This commit is contained in:
parent
075a8a6548
commit
c66c68b137
6 changed files with 23 additions and 23 deletions
|
|
@ -43,7 +43,7 @@ static
|
|||
bool
|
||||
_is_attrname_security_capability(const char *attrname_)
|
||||
{
|
||||
return (strcmp(attrname_,SECURITY_CAPABILITY) == 0);
|
||||
return str::eq(attrname_,SECURITY_CAPABILITY);
|
||||
}
|
||||
|
||||
static
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ _create(const Branches::Ptr &branches_,
|
|||
obranch = &branch;
|
||||
}
|
||||
|
||||
if(obranch == nullptr)
|
||||
if(!obranch)
|
||||
return -error;
|
||||
|
||||
paths_.emplace_back(obranch);
|
||||
|
|
@ -109,7 +109,7 @@ _action(const Branches::Ptr &branches_,
|
|||
obranch = &branch;
|
||||
}
|
||||
|
||||
if(obranch == nullptr)
|
||||
if(!obranch)
|
||||
return -error;
|
||||
|
||||
paths_.emplace_back(obranch);
|
||||
|
|
@ -144,7 +144,7 @@ _search(const Branches::Ptr &branches_,
|
|||
obranch = &branch;
|
||||
}
|
||||
|
||||
if(obranch == nullptr)
|
||||
if(!obranch)
|
||||
return -ENOENT;
|
||||
|
||||
paths_.emplace_back(obranch);
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ _create(const Branches::Ptr &branches_,
|
|||
obranch = &branch;
|
||||
}
|
||||
|
||||
if(obranch == nullptr)
|
||||
if(!obranch)
|
||||
return -error;
|
||||
|
||||
paths_.emplace_back(obranch);
|
||||
|
|
@ -106,7 +106,7 @@ _action(const Branches::Ptr &branches_,
|
|||
obranch = &branch;
|
||||
}
|
||||
|
||||
if(obranch == nullptr)
|
||||
if(!obranch)
|
||||
return -error;
|
||||
|
||||
paths_.emplace_back(obranch);
|
||||
|
|
@ -141,7 +141,7 @@ _search(const Branches::Ptr &branches_,
|
|||
obranch = &branch;
|
||||
}
|
||||
|
||||
if(obranch == nullptr)
|
||||
if(!obranch)
|
||||
return -ENOENT;
|
||||
|
||||
paths_.emplace_back(obranch);
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ _create(const Branches::Ptr &branches_,
|
|||
obranch = &branch;
|
||||
}
|
||||
|
||||
if(obranch == nullptr)
|
||||
if(!obranch)
|
||||
return -error;
|
||||
|
||||
paths_.emplace_back(obranch);
|
||||
|
|
@ -107,7 +107,7 @@ _action(const Branches::Ptr &branches_,
|
|||
obranch = &branch;
|
||||
}
|
||||
|
||||
if(obranch == nullptr)
|
||||
if(!obranch)
|
||||
return -error;
|
||||
|
||||
paths_.emplace_back(obranch);
|
||||
|
|
@ -142,7 +142,7 @@ _search(const Branches::Ptr &branches_,
|
|||
obranch = &branch;
|
||||
}
|
||||
|
||||
if(obranch == nullptr)
|
||||
if(!obranch)
|
||||
return -ENOENT;
|
||||
|
||||
paths_.emplace_back(obranch);
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ _action(const Branches::Ptr &branches_,
|
|||
total = 1;
|
||||
}
|
||||
|
||||
if(obranch == nullptr)
|
||||
if(!obranch)
|
||||
{
|
||||
best_used = used;
|
||||
best_total = total;
|
||||
|
|
@ -89,7 +89,7 @@ _action(const Branches::Ptr &branches_,
|
|||
obranch = &branch;
|
||||
}
|
||||
|
||||
if(obranch == nullptr)
|
||||
if(!obranch)
|
||||
return -error;
|
||||
|
||||
paths_.emplace_back(obranch);
|
||||
|
|
@ -132,7 +132,7 @@ _search(const Branches::Ptr &branches_,
|
|||
total = 1;
|
||||
}
|
||||
|
||||
if(obranch == nullptr)
|
||||
if(!obranch)
|
||||
{
|
||||
best_used = used;
|
||||
best_total = total;
|
||||
|
|
@ -150,7 +150,7 @@ _search(const Branches::Ptr &branches_,
|
|||
obranch = &branch;
|
||||
}
|
||||
|
||||
if(obranch == nullptr)
|
||||
if(!obranch)
|
||||
return -ENOENT;
|
||||
|
||||
paths_.emplace_back(obranch);
|
||||
|
|
@ -195,7 +195,7 @@ _create(const Branches::Ptr &branches_,
|
|||
total = 1;
|
||||
}
|
||||
|
||||
if(obranch == nullptr)
|
||||
if(!obranch)
|
||||
{
|
||||
best_used = used;
|
||||
best_total = total;
|
||||
|
|
@ -213,7 +213,7 @@ _create(const Branches::Ptr &branches_,
|
|||
obranch = &branch;
|
||||
}
|
||||
|
||||
if(obranch == nullptr)
|
||||
if(!obranch)
|
||||
return -error;
|
||||
|
||||
paths_.emplace_back(obranch);
|
||||
|
|
|
|||
|
|
@ -46,16 +46,16 @@ _create_1(const Branches::Ptr &branches_,
|
|||
for(auto &branch : *branches_)
|
||||
{
|
||||
if(branch.ro_or_nc())
|
||||
error_and_continue(*err_,-EROFS);
|
||||
error_and_continue(*err_,EROFS);
|
||||
if(!fs::exists(branch.path,fusepath_))
|
||||
error_and_continue(*err_,-ENOENT);
|
||||
error_and_continue(*err_,ENOENT);
|
||||
rv = fs::info(branch.path,&info);
|
||||
if(rv < 0)
|
||||
error_and_continue(*err_,-ENOENT);
|
||||
error_and_continue(*err_,ENOENT);
|
||||
if(info.readonly)
|
||||
error_and_continue(*err_,-EROFS);
|
||||
error_and_continue(*err_,EROFS);
|
||||
if(info.spaceavail < branch.minfreespace())
|
||||
error_and_continue(*err_,-ENOSPC);
|
||||
error_and_continue(*err_,ENOSPC);
|
||||
if(info.spaceused >= lus)
|
||||
continue;
|
||||
|
||||
|
|
@ -76,7 +76,7 @@ _create(const Branches::Ptr &branches_,
|
|||
Branch *branch;
|
||||
fs::path fusepath;
|
||||
|
||||
err = -ENOENT;
|
||||
err = ENOENT;
|
||||
fusepath = fusepath_;
|
||||
for(;;)
|
||||
{
|
||||
|
|
@ -89,7 +89,7 @@ _create(const Branches::Ptr &branches_,
|
|||
}
|
||||
|
||||
if(!branch)
|
||||
return err;
|
||||
return -err;
|
||||
|
||||
paths_.emplace_back(branch);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue