]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sysctl: propagate failures in parsing credential files
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 5 Oct 2025 17:27:27 +0000 (02:27 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 5 Oct 2025 17:30:28 +0000 (02:30 +0900)
We already propagate failures in parsing conf files in usual places, or
given by command arguments. Let's make the behavior consistent.

src/sysctl/sysctl.c

index 3055f796324d550bdd1b21bbf5022460301f996f..c2b5ca05c5df26d700dcfe799bb41ce81f99a3ad 100644 (file)
@@ -323,8 +323,7 @@ static int read_credential_lines(OrderedHashmap **sysctl_options) {
         if (!j)
                 return log_oom();
 
-        (void) parse_file(sysctl_options, j, /* ignore_enoent= */ true);
-        return 0;
+        return parse_file(sysctl_options, j, /* ignore_enoent= */ true);
 }
 
 static int cat_config(char **files) {