]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
basic: fix consistency of flags argument for chase and chaseat
authorJelle van der Waa <jvanderwaa@redhat.com>
Fri, 9 May 2025 13:42:26 +0000 (15:42 +0200)
committerJelle van der Waa <jvanderwaa@redhat.com>
Wed, 14 May 2025 10:10:54 +0000 (12:10 +0200)
Both functions have one flags argument, so we don't need to
rename them to `chase_flags`.

src/basic/chase.h
src/basic/terminal-util.c

index eda7cad0b76d2fd6fb11d94ad2e37744c60c4ba8..2146f54e7aa78ab04d3b9b869a2fe8edc563ad2c 100644 (file)
@@ -38,7 +38,7 @@ bool unsafe_transition(const struct stat *a, const struct stat *b);
 /* How many iterations to execute before returning -ELOOP */
 #define CHASE_MAX 32
 
-int chase(const char *path_with_prefix, const char *root, ChaseFlags chase_flags, char **ret_path, int *ret_fd);
+int chase(const char *path_with_prefix, const char *root, ChaseFlags flags, char **ret_path, int *ret_fd);
 
 int chaseat_prefix_root(const char *path, const char *root, char **ret);
 int chase_extract_filename(const char *path, const char *root, char **ret);
index acd25389524ac34eb2122118e87a7046b3f45c00..7c900c267d4a721ec5f26dd5ea6e97f44561dd5c 100644 (file)
@@ -1119,7 +1119,7 @@ int resolve_dev_console(char **ret) {
          * is a sign for container setups). */
 
         _cleanup_free_ char *chased = NULL;
-        r = chase("/dev/console", /* root= */ NULL, /* chase_flags= */ 0,  &chased, /* ret_fd= */ NULL);
+        r = chase("/dev/console", /* root= */ NULL, /* flags= */ 0,  &chased, /* ret_fd= */ NULL);
         if (r < 0)
                 return r;
         if (!path_equal(chased, "/dev/console")) {