summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Eden <yamakuzure@gmx.net>2018-08-23 08:21:15 +0200
committerSven Eden <yamakuzure@gmx.net>2018-08-24 16:47:08 +0200
commitb25b2a67797b33975179e17c97baba19bbf020ab (patch)
treeb4a603bcfb5e130662d00f3ab2cff0d8ce8f83ab
parentae13c1d48a78a6273e403f690ed7d9538a31070a (diff)
Prep v239: Fix main() to call manager_new() again.
-rw-r--r--cb/elogind.cbp99
-rw-r--r--src/login/elogind.c2
-rw-r--r--src/login/inhibit.c2
-rw-r--r--src/login/logind.c14
4 files changed, 20 insertions, 97 deletions
diff --git a/cb/elogind.cbp b/cb/elogind.cbp
index 0245f86..4168fbe 100644
--- a/cb/elogind.cbp
+++ b/cb/elogind.cbp
@@ -906,9 +906,6 @@
<Option target="all" />
<Option target="clean" />
</Unit>
- <Option target="all" />
- <Option target="clean" />
- </Unit>
<Unit filename="../src/shared/udev-util.h">
<Option target="all" />
<Option target="clean" />
@@ -977,68 +974,48 @@
</Unit>
<Unit filename="../src/test/test-alloc-util.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
+ </Unit>
+ <Unit filename="../src/test/test-bus-util.c">
+ <Option compilerVar="CC" />
</Unit>
<Unit filename="../src/test/test-cgroup.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
</Unit>
<Unit filename="../src/test/test-conf-files.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
</Unit>
<Unit filename="../src/test/test-conf-parser.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
</Unit>
<Unit filename="../src/test/test-copy.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
</Unit>
<Unit filename="../src/test/test-dlopen.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
</Unit>
<Unit filename="../src/test/test-ellipsize.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
</Unit>
<Unit filename="../src/test/test-escape.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
</Unit>
<Unit filename="../src/test/test-exec-util.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
</Unit>
<Unit filename="../src/test/test-extract-word.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
</Unit>
<Unit filename="../src/test/test-fd-util.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
+ </Unit>
+ <Unit filename="../src/test/test-format-table.c">
+ <Option compilerVar="CC" />
</Unit>
<Unit filename="../src/test/test-fs-util.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
</Unit>
<Unit filename="../src/test/test-hash.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
</Unit>
<Unit filename="../src/test/test-hashmap-ordered.c">
<Option compilerVar="CC" />
@@ -1047,150 +1024,94 @@
</Unit>
<Unit filename="../src/test/test-hashmap-plain.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
</Unit>
<Unit filename="../src/test/test-hashmap.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
- </Unit>
- <Unit filename="../src/test/test-helper.h">
- <Option target="all" />
- <Option target="clean" />
</Unit>
+ <Unit filename="../src/test/test-helper.h" />
<Unit filename="../src/test/test-hexdecoct.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
</Unit>
<Unit filename="../src/test/test-id128.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
</Unit>
<Unit filename="../src/test/test-io-util.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
</Unit>
<Unit filename="../src/test/test-ipcrm.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
</Unit>
<Unit filename="../src/test/test-list.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
</Unit>
<Unit filename="../src/test/test-locale-util.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
</Unit>
<Unit filename="../src/test/test-log.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
+ </Unit>
+ <Unit filename="../src/test/test-os-util.c">
+ <Option compilerVar="CC" />
</Unit>
<Unit filename="../src/test/test-parse-util.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
</Unit>
<Unit filename="../src/test/test-path-util.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
</Unit>
<Unit filename="../src/test/test-prioq.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
</Unit>
<Unit filename="../src/test/test-proc-cmdline.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
</Unit>
<Unit filename="../src/test/test-process-util.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
</Unit>
<Unit filename="../src/test/test-procfs-util.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="../src/test/test-random-util.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
</Unit>
<Unit filename="../src/test/test-selinux.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
</Unit>
<Unit filename="../src/test/test-set.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
</Unit>
<Unit filename="../src/test/test-signal-util.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
</Unit>
<Unit filename="../src/test/test-siphash24.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
</Unit>
<Unit filename="../src/test/test-sizeof.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
</Unit>
<Unit filename="../src/test/test-stat-util.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
</Unit>
<Unit filename="../src/test/test-string-util.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
</Unit>
<Unit filename="../src/test/test-strip-tab-ansi.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
</Unit>
<Unit filename="../src/test/test-unaligned.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
</Unit>
<Unit filename="../src/test/test-user-util.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
</Unit>
<Unit filename="../src/test/test-utf8.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
</Unit>
<Unit filename="../src/test/test-util.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
</Unit>
<Unit filename="../src/test/test-verbs.c">
<Option compilerVar="CC" />
- <Option target="all" />
- <Option target="clean" />
</Unit>
<Unit filename="../src/update-utmp/meson.build">
<Option target="all" />
diff --git a/src/login/elogind.c b/src/login/elogind.c
index c884789..9fe52a9 100644
--- a/src/login/elogind.c
+++ b/src/login/elogind.c
@@ -448,7 +448,7 @@ void elogind_manager_reset_config(Manager* m) {
while (m->hybrid_sleep_state[++dbg_cnt])
log_debug_elogind("hybrid_sleep_state[%d] = %s",
dbg_cnt, m->hybrid_sleep_state[dbg_cnt]);
- log_debug_elogind("hibernate_delay_sec: %ul seconds (%ul minutes)",
+ log_debug_elogind("hibernate_delay_sec: %lu seconds (%lu minutes)",
m->hibernate_delay_sec / USEC_PER_SEC,
m->hibernate_delay_sec / USEC_PER_MINUTE);
#endif // ENABLE_DEBUG_ELOGIND
diff --git a/src/login/inhibit.c b/src/login/inhibit.c
index 6ade264..cc1ff2f 100644
--- a/src/login/inhibit.c
+++ b/src/login/inhibit.c
@@ -13,7 +13,7 @@
#include "bus-util.h"
#include "fd-util.h"
#include "format-util.h"
-//#include "pager.h"
+#include "pager.h"
#include "process-util.h"
#include "signal-util.h"
#include "strv.h"
diff --git a/src/login/logind.c b/src/login/logind.c
index 4c45779..d87c381 100644
--- a/src/login/logind.c
+++ b/src/login/logind.c
@@ -1291,12 +1291,6 @@ int main(int argc, char *argv[]) {
(void) mkdir_label("/run/systemd/seats", 0755);
(void) mkdir_label("/run/systemd/users", 0755);
(void) mkdir_label("/run/systemd/sessions", 0755);
-
- assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGHUP, SIGTERM, SIGINT, -1) >= 0);
-
- r = manager_new(&m);
- if (r < 0) {
- log_error_errno(r, "Failed to allocate manager object: %m");
#else
r = mkdir_label("/run/systemd", 0755);
if ( (r < 0) && (-EEXIST != r) )
@@ -1315,6 +1309,14 @@ int main(int argc, char *argv[]) {
return log_error_errno(r, "Failed to create /run/systemd/machines : %m");
#endif // 0
+ assert_se(sigprocmask_many(SIG_BLOCK, NULL, SIGHUP, SIGTERM, SIGINT, -1) >= 0);
+
+ r = manager_new(&m);
+ if (r < 0) {
+ log_error_errno(r, "Failed to allocate manager object: %m");
+ goto finish;
+ }
+
(void) manager_parse_config_file(m);
#if 1 /// elogind needs an Add-On for sleep configuration