summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSven Eden <yamakuzure@gmx.net>2018-08-20 19:15:58 +0200
committerSven Eden <yamakuzure@gmx.net>2018-08-24 16:47:08 +0200
commitcf380e653e9ff12805ef32041118fe3c1b9fbd55 (patch)
tree9db95103c4033f921e787b6b26854dedff024ac1 /src
parent0b169925aa9f606dc96fbffc069d76e0ffa45c29 (diff)
Prep v239: Update manager_parse_config_file() that got moved to logind-core.c
Diffstat (limited to 'src')
-rw-r--r--src/login/logind-core.c14
-rw-r--r--src/login/logind.c16
-rw-r--r--src/login/meson.build4
3 files changed, 15 insertions, 19 deletions
diff --git a/src/login/logind-core.c b/src/login/logind-core.c
index 49c1cbcfb..db0df19e2 100644
--- a/src/login/logind-core.c
+++ b/src/login/logind-core.c
@@ -59,10 +59,22 @@ void manager_reset_config(Manager *m) {
int manager_parse_config_file(Manager *m) {
assert(m);
+#if 0 /// elogind parses its own config file
return config_parse_many_nulstr(PKGSYSCONFDIR "/logind.conf",
- CONF_PATHS_NULSTR("elogind/logind.conf.d"),
+ CONF_PATHS_NULSTR("systemd/logind.conf.d"),
"Login\0",
config_item_perf_lookup, logind_gperf_lookup,
+#else
+ const char* logind_conf = getenv("ELOGIND_CONF_FILE");
+
+ assert(m);
+
+ if (!logind_conf)
+ logind_conf = PKGSYSCONFDIR "/logind.conf";
+
+ return config_parse(NULL, logind_conf, NULL, "Login\0Sleep\0",
+ config_item_perf_lookup, logind_gperf_lookup,
+#endif // 0
CONFIG_PARSE_WARN, m);
}
diff --git a/src/login/logind.c b/src/login/logind.c
index 048689fad..b60536700 100644
--- a/src/login/logind.c
+++ b/src/login/logind.c
@@ -22,7 +22,7 @@
#include "format-util.h"
#include "fs-util.h"
#include "logind.h"
-//#include "parse-util.h"
+#include "parse-util.h"
//#include "process-util.h"
#include "selinux-util.h"
#include "signal-util.h"
@@ -74,7 +74,7 @@ static int manager_new(Manager **ret) {
#if 1 /// elogind needs some more data
r = elogind_manager_new(m);
if (r < 0)
- goto fail;
+ return r;
#endif // 1
m->udev = udev_new();
if (!m->udev)
@@ -1107,18 +1107,6 @@ static int manager_dispatch_idle_action(sd_event_source *s, uint64_t t, void *us
return 0;
}
-#if 0 /// elogind parses its own config file
-#else
- const char* logind_conf = getenv("ELOGIND_CONF_FILE");
-
- assert(m);
-
- if (!logind_conf)
- logind_conf = PKGSYSCONFDIR "/logind.conf";
-
- return config_parse(NULL, logind_conf, NULL, "Login\0Sleep\0",
- config_item_perf_lookup, logind_gperf_lookup,
-#endif // 0
static int manager_dispatch_reload_signal(sd_event_source *s, const struct signalfd_siginfo *si, void *userdata) {
Manager *m = userdata;
int r;
diff --git a/src/login/meson.build b/src/login/meson.build
index 59083e6fc..1bbb7d178 100644
--- a/src/login/meson.build
+++ b/src/login/meson.build
@@ -20,10 +20,6 @@ logind_gperf_c = custom_target(
output : 'logind-gperf.c',
command : [gperf, '@INPUT@', '--output-file', '@OUTPUT@'])
-#if 0 /// rename to elogind
-#else
-elogind_sources += [logind_gperf_c]
-#endif // 0
liblogind_core_sources = files('''
logind-core.c
logind-device.c