summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/resolve/resolved-manager.c')
-rw-r--r--src/resolve/resolved-manager.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/resolve/resolved-manager.c b/src/resolve/resolved-manager.c
index 3ed0603f9b..0e2b85b5a9 100644
--- a/src/resolve/resolved-manager.c
+++ b/src/resolve/resolved-manager.c
@@ -97,23 +97,13 @@ int config_parse_dnsv(
}
static int manager_parse_config_file(Manager *m) {
- static const char fn[] = "/etc/systemd/resolved.conf";
- _cleanup_fclose_ FILE *f = NULL;
int r;
assert(m);
- f = fopen(fn, "re");
- if (!f) {
- if (errno == ENOENT)
- return 0;
-
- log_warning("Failed to open configuration file %s: %m", fn);
- return -errno;
- }
-
- r = config_parse(NULL, fn, f, "Resolve\0", config_item_perf_lookup,
- (void*) resolved_gperf_lookup, false, false, m);
+ r = config_parse(NULL, "/etc/systemd/resolved.conf", NULL,
+ "Resolve\0", config_item_perf_lookup, (void*) resolved_gperf_lookup,
+ false, false, m);
if (r < 0)
log_warning("Failed to parse configuration file: %s", strerror(-r));