summaryrefslogtreecommitdiff
path: root/src/systemctl/systemctl.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-04-05 12:10:11 +0200
committerGitHub <noreply@github.com>2017-04-05 12:10:11 +0200
commit6cb484cc062b79db925f04cb8bb7a5cfac622d51 (patch)
treeb6ae996ce5c5c3cb03f59d6af0095777dfe37250 /src/systemctl/systemctl.c
parent5e8273acac6af57d8c9cdec57388bab451a4cbc0 (diff)
parentcc566cd06caf01b9caf609cf872800a5bbd64993 (diff)
Merge pull request #5706 from keszybz/make-cleanups
Move busctl to its own dir and other cleanups
Diffstat (limited to 'src/systemctl/systemctl.c')
-rw-r--r--src/systemctl/systemctl.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index cb9ca9ae1e..64945121f7 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -3191,8 +3191,8 @@ static int start_unit(int argc, char *argv[], void *userdata) {
return r;
}
+#ifdef ENABLE_LOGIND
static int logind_set_wall_message(void) {
-#ifdef HAVE_LOGIND
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
sd_bus *bus;
_cleanup_free_ char *m = NULL;
@@ -3220,15 +3220,14 @@ static int logind_set_wall_message(void) {
if (r < 0)
return log_warning_errno(r, "Failed to set wall message, ignoring: %s", bus_error_message(&error, r));
-
-#endif
return 0;
}
+#endif
/* Ask systemd-logind, which might grant access to unprivileged users
* through PolicyKit */
static int logind_reboot(enum action a) {
-#ifdef HAVE_LOGIND
+#ifdef ENABLE_LOGIND
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
const char *method, *description;
sd_bus *bus;
@@ -3291,7 +3290,7 @@ static int logind_reboot(enum action a) {
}
static int logind_check_inhibitors(enum action a) {
-#ifdef HAVE_LOGIND
+#ifdef ENABLE_LOGIND
_cleanup_(sd_bus_message_unrefp) sd_bus_message *reply = NULL;
_cleanup_strv_free_ char **sessions = NULL;
const char *what, *who, *why, *mode;
@@ -3410,7 +3409,7 @@ static int logind_check_inhibitors(enum action a) {
}
static int logind_prepare_firmware_setup(void) {
-#ifdef HAVE_LOGIND
+#ifdef ENABLE_LOGIND
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
sd_bus *bus;
int r;
@@ -8281,7 +8280,7 @@ static int halt_now(enum action a) {
static int logind_schedule_shutdown(void) {
-#ifdef HAVE_LOGIND
+#ifdef ENABLE_LOGIND
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
char date[FORMAT_TIMESTAMP_MAX];
const char *action;
@@ -8409,7 +8408,7 @@ static int runlevel_main(void) {
}
static int logind_cancel_shutdown(void) {
-#ifdef HAVE_LOGIND
+#ifdef ENABLE_LOGIND
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
sd_bus *bus;
int r;