mirror of
https://github.com/systemd/systemd.git
synced 2024-12-27 07:22:31 +03:00
core:namespace: minor improvements to append_mounts()
This commit is contained in:
parent
cefc33aee2
commit
9c94d52e09
@ -70,12 +70,11 @@ static int append_mounts(BindMount **p, char **strv, MountMode mode) {
|
||||
assert(p);
|
||||
|
||||
STRV_FOREACH(i, strv) {
|
||||
bool ignore = false;
|
||||
|
||||
(*p)->ignore = false;
|
||||
|
||||
if ((mode == INACCESSIBLE || mode == READONLY || mode == READWRITE) && (*i)[0] == '-') {
|
||||
(*p)->ignore = true;
|
||||
if (IN_SET(mode, INACCESSIBLE, READONLY, READWRITE) && startswith(*i, "-")) {
|
||||
(*i)++;
|
||||
ignore = true;
|
||||
}
|
||||
|
||||
if (!path_is_absolute(*i))
|
||||
@ -83,6 +82,7 @@ static int append_mounts(BindMount **p, char **strv, MountMode mode) {
|
||||
|
||||
(*p)->path = *i;
|
||||
(*p)->mode = mode;
|
||||
(*p)->ignore = ignore;
|
||||
(*p)++;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user