summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Eden <yamakuzure@gmx.net>2018-08-27 08:44:24 +0200
committerSven Eden <yamakuzure@gmx.net>2018-08-27 09:10:27 +0200
commit9d814db96b6f093fc334f60fa7c97fb3ce9852a8 (patch)
tree55b4d63a303ca27c69816c58f3d731bf16f28c39
parentc552a8e6e51f69d5afc5deb724fd9ae184a4fbe7 (diff)
Prep v239: A few cosmetic upgrades
-rw-r--r--man/custom-entities.ent.in16
-rw-r--r--meson.build13
m---------pwx0
-rw-r--r--src/login/logind-dbus.c1
-rw-r--r--src/shared/sleep-config.c8
-rw-r--r--src/sleep/sleep.c1
6 files changed, 30 insertions, 9 deletions
diff --git a/man/custom-entities.ent.in b/man/custom-entities.ent.in
index 002028df0..9c70fecb2 100644
--- a/man/custom-entities.ent.in
+++ b/man/custom-entities.ent.in
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- 0 /// elogind does not has any of these but KILL_USER_PROCESSES.
-<!ENTITY MOUNT_PATH @MOUNT_PATH@>
-<!ENTITY UMOUNT_PATH @UMOUNT_PATH@>
-<!ENTITY systemgeneratordir @SYSTEM_GENERATOR_PATH@>
-<!ENTITY usergeneratordir @USER_GENERATOR_PATH@>
-<!ENTITY systemenvgeneratordir @SYSTEM_ENV_GENERATOR_PATH@>
-<!ENTITY userenvgeneratordir @USER_ENV_GENERATOR_PATH@>
-<!ENTITY CERTIFICATE_ROOT @CERTIFICATE_ROOT@>
-<!ENTITY MEMORY_ACCOUNTING_DEFAULT @MEMORY_ACCOUNTING_DEFAULT_YES_NO@>
+# <!ENTITY MOUNT_PATH @MOUNT_PATH@>
+# <!ENTITY UMOUNT_PATH @UMOUNT_PATH@>
+# <!ENTITY systemgeneratordir @SYSTEM_GENERATOR_PATH@>
+# <!ENTITY usergeneratordir @USER_GENERATOR_PATH@>
+# <!ENTITY systemenvgeneratordir @SYSTEM_ENV_GENERATOR_PATH@>
+# <!ENTITY userenvgeneratordir @USER_ENV_GENERATOR_PATH@>
+# <!ENTITY CERTIFICATE_ROOT @CERTIFICATE_ROOT@>
+# <!ENTITY MEMORY_ACCOUNTING_DEFAULT @MEMORY_ACCOUNTING_DEFAULT_YES_NO@>
// 0 -->
<!ENTITY KILL_USER_PROCESSES @KILL_USER_PROCESSES_YES_NO@>
diff --git a/meson.build b/meson.build
index cdb4dedc8..93a108000 100644
--- a/meson.build
+++ b/meson.build
@@ -1442,6 +1442,19 @@ conf.set10('ENABLE_EFI', have)
#####################################################################
+#if 1 /// These are not needed by elogind, but meson wants them although they are commented out.
+conf.set_quoted('CERTIFICATE_ROOT', '/dev/null')
+conf.set_quoted('MEMORY_ACCOUNTING_DEFAULT_YES_NO', 'N/A')
+conf.set_quoted('MOUNT_PATH', '/dev/null')
+conf.set_quoted('SYSTEM_ENV_GENERATOR_PATH', '/dev/null')
+conf.set_quoted('SYSTEM_GENERATOR_PATH', '/dev/null')
+conf.set_quoted('UMOUNT_PATH', '/dev/null')
+conf.set_quoted('USER_ENV_GENERATOR_PATH', '/dev/null')
+conf.set_quoted('USER_GENERATOR_PATH', '/dev/null')
+#####################################################################
+
+#endif // 1
+
config_h = configure_file(
output : 'config.h',
configuration : conf)
diff --git a/pwx b/pwx
-Subproject 2bee2d8292d4cfb3bfdfd6ac7db3a5ca75aca30
+Subproject d50863bb69d4fd2c59070f2fc931ff113a68c6b
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
index 63a206ce2..5178dd847 100644
--- a/src/login/logind-dbus.c
+++ b/src/login/logind-dbus.c
@@ -2434,7 +2434,6 @@ static int method_can_shutdown_or_sleep(
}
finish:
-
return sd_bus_reply_method_return(message, "s", result);
}
diff --git a/src/shared/sleep-config.c b/src/shared/sleep-config.c
index 1d7d46ac1..77b380ca3 100644
--- a/src/shared/sleep-config.c
+++ b/src/shared/sleep-config.c
@@ -363,7 +363,11 @@ static bool can_s2h(Manager *m) {
}
FOREACH_STRING(p, "suspend", "hibernate") {
+#if 0 /// elogind must transport a pointer to its managers instance
+ r = can_sleep(p);
+#else
r = can_sleep(m, p);
+#endif // 0
if (IN_SET(r, 0, -ENOSPC)) {
log_debug("Unable to %s system.", p);
return false;
@@ -395,7 +399,11 @@ int can_sleep(Manager *m, const char *verb) {
assert(STR_IN_SET(verb, "suspend", "hibernate", "hybrid-sleep", "suspend-then-hibernate"));
if (streq(verb, "suspend-then-hibernate"))
+#if 0 /// elogind must transport a pointer to its managers instance
+ return can_s2h();
+#else
return can_s2h(m);
+#endif // 0
#if 0 /// already parsed by elogind config
r = parse_sleep_config(verb, &modes, &states, NULL);
diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c
index fba7b9baf..87efd0ac7 100644
--- a/src/sleep/sleep.c
+++ b/src/sleep/sleep.c
@@ -383,6 +383,7 @@ int main(int argc, char *argv[]) {
r = execute_s2h(delay);
else
r = execute(modes, states);
+finish:
return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
}
#else