summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/basic/fs-util.c4
-rw-r--r--src/basic/fs-util.h2
-rw-r--r--src/nspawn/nspawn-mount.c8
-rw-r--r--src/nspawn/nspawn.c2
-rw-r--r--src/test/test-fs-util.c8
5 files changed, 12 insertions, 12 deletions
diff --git a/src/basic/fs-util.c b/src/basic/fs-util.c
index 0ca4656fdd..b30cec4f92 100644
--- a/src/basic/fs-util.c
+++ b/src/basic/fs-util.c
@@ -711,10 +711,10 @@ int chase_symlinks(const char *path, const char *original_root, unsigned flags,
if (child < 0) {
if (errno == ENOENT &&
- (flags & CHASE_NON_EXISTING) &&
+ (flags & CHASE_NONEXISTENT) &&
(isempty(todo) || path_is_safe(todo))) {
- /* If CHASE_NON_EXISTING is set, and the path does not exist, then that's OK, return
+ /* If CHASE_NONEXISTENT is set, and the path does not exist, then that's OK, return
* what we got so far. But don't allow this if the remaining path contains "../ or "./"
* or something else weird. */
diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h
index 3931534a42..0d925c6b84 100644
--- a/src/basic/fs-util.h
+++ b/src/basic/fs-util.h
@@ -80,7 +80,7 @@ int inotify_add_watch_fd(int fd, int what, uint32_t mask);
enum {
CHASE_PREFIX_ROOT = 1, /* If set, the specified path will be prefixed by the specified root before beginning the iteration */
- CHASE_NON_EXISTING = 2, /* If set, it's OK if the path doesn't actually exist. */
+ CHASE_NONEXISTENT = 2, /* If set, it's OK if the path doesn't actually exist. */
};
int chase_symlinks(const char *path_with_prefix, const char *root, unsigned flags, char **ret);
diff --git a/src/nspawn/nspawn-mount.c b/src/nspawn/nspawn-mount.c
index 9024ea1385..c9d5ac419e 100644
--- a/src/nspawn/nspawn-mount.c
+++ b/src/nspawn/nspawn-mount.c
@@ -587,7 +587,7 @@ int mount_all(const char *dest,
if (!ro && (bool)(mount_table[k].mount_settings & MOUNT_APPLY_APIVFS_RO))
continue;
- r = chase_symlinks(mount_table[k].where, dest, CHASE_NON_EXISTING|CHASE_PREFIX_ROOT, &where);
+ r = chase_symlinks(mount_table[k].where, dest, CHASE_NONEXISTENT|CHASE_PREFIX_ROOT, &where);
if (r < 0)
return log_error_errno(r, "Failed to resolve %s/%s: %m", dest, mount_table[k].where);
@@ -686,7 +686,7 @@ static int mount_bind(const char *dest, CustomMount *m) {
if (stat(m->source, &source_st) < 0)
return log_error_errno(errno, "Failed to stat %s: %m", m->source);
- r = chase_symlinks(m->destination, dest, CHASE_PREFIX_ROOT|CHASE_NON_EXISTING, &where);
+ r = chase_symlinks(m->destination, dest, CHASE_PREFIX_ROOT|CHASE_NONEXISTENT, &where);
if (r < 0)
return log_error_errno(r, "Failed to resolve %s/%s: %m", dest, m->destination);
if (r > 0) { /* Path exists already? */
@@ -748,7 +748,7 @@ static int mount_tmpfs(
assert(dest);
assert(m);
- r = chase_symlinks(m->destination, dest, CHASE_PREFIX_ROOT|CHASE_NON_EXISTING, &where);
+ r = chase_symlinks(m->destination, dest, CHASE_PREFIX_ROOT|CHASE_NONEXISTENT, &where);
if (r < 0)
return log_error_errno(r, "Failed to resolve %s/%s: %m", dest, m->destination);
if (r == 0) { /* Doesn't exist yet? */
@@ -789,7 +789,7 @@ static int mount_overlay(const char *dest, CustomMount *m) {
assert(dest);
assert(m);
- r = chase_symlinks(m->destination, dest, CHASE_PREFIX_ROOT|CHASE_NON_EXISTING, &where);
+ r = chase_symlinks(m->destination, dest, CHASE_PREFIX_ROOT|CHASE_NONEXISTENT, &where);
if (r < 0)
return log_error_errno(r, "Failed to resolve %s/%s: %m", dest, m->destination);
if (r == 0) { /* Doesn't exist yet? */
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index 84c213785c..ddd6a64ec6 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -4135,7 +4135,7 @@ int main(int argc, char *argv[]) {
remove_directory = true;
} else {
- r = chase_symlinks_and_update(&arg_directory, arg_template ? CHASE_NON_EXISTING : 0);
+ r = chase_symlinks_and_update(&arg_directory, arg_template ? CHASE_NONEXISTENT : 0);
if (r < 0)
goto finish;
diff --git a/src/test/test-fs-util.c b/src/test/test-fs-util.c
index 2570bc5859..b502cd0ad1 100644
--- a/src/test/test-fs-util.c
+++ b/src/test/test-fs-util.c
@@ -72,7 +72,7 @@ static void test_chase_symlinks(void) {
q = strjoina(temp, "/usr");
- r = chase_symlinks(p, temp, CHASE_NON_EXISTING, &result);
+ r = chase_symlinks(p, temp, CHASE_NONEXISTENT, &result);
assert_se(r == 0);
assert_se(path_equal(result, q));
@@ -162,7 +162,7 @@ static void test_chase_symlinks(void) {
r = chase_symlinks(p, NULL, 0, &result);
assert_se(r == -ENOENT);
- r = chase_symlinks(p, NULL, CHASE_NON_EXISTING, &result);
+ r = chase_symlinks(p, NULL, CHASE_NONEXISTENT, &result);
assert_se(r == 0);
assert_se(path_equal(result, p));
result = mfree(result);
@@ -171,7 +171,7 @@ static void test_chase_symlinks(void) {
r = chase_symlinks(p, NULL, 0, &result);
assert_se(r == -ENOENT);
- r = chase_symlinks(p, NULL, CHASE_NON_EXISTING, &result);
+ r = chase_symlinks(p, NULL, CHASE_NONEXISTENT, &result);
assert_se(r == 0);
assert_se(path_equal(result, p));
result = mfree(result);
@@ -182,7 +182,7 @@ static void test_chase_symlinks(void) {
r = chase_symlinks(p, NULL, 0, &result);
assert_se(r == -ENOENT);
- r = chase_symlinks(p, NULL, CHASE_NON_EXISTING, &result);
+ r = chase_symlinks(p, NULL, CHASE_NONEXISTENT, &result);
assert_se(r == -ENOENT);
assert_se(rm_rf(temp, REMOVE_ROOT|REMOVE_PHYSICAL) >= 0);