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. */
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);
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);
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? */
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? */
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? */
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;
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));
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);
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);
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);