chase-symlinks: Rename chase_symlinks() to chase()

Chasing symlinks is a core function that's used in a lot of places
so it deservers a less verbose names so let's rename it to chase()
and chaseat().

We also slightly change the pattern used for the chaseat() helpers
so we get chase_and_openat() and similar.
This commit is contained in:
Daan De Meyer
2023-03-24 13:43:51 +01:00
committed by Zbigniew Jędrzejewski-Szmek
parent 0da2780c8a
commit f461a28da7
64 changed files with 374 additions and 384 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include "chase-symlinks.h"
#include "chase.h"
#include "fd-util.h"
#include "fileio.h"
#include "missing_threads.h"
@@ -40,7 +40,7 @@ int read_login_defs(UGIDAllocationRange *ret_defs, const char *path, const char
if (!path)
path = "/etc/login.defs";
r = chase_symlinks_and_fopen_unlocked(path, root, CHASE_PREFIX_ROOT, "re", NULL, &f);
r = chase_and_fopen_unlocked(path, root, CHASE_PREFIX_ROOT, "re", NULL, &f);
if (r == -ENOENT)
goto defaults;
if (r < 0)