From b59f0ecd27b1c6e24a1835e31c638dcf765517e4 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 23 Mar 2016 08:46:39 +0100 Subject: core: fix "stoppping" typo --- src/core/job.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/job.c b/src/core/job.c index 719cb0a3e5..5557a6a942 100644 --- a/src/core/job.c +++ b/src/core/job.c @@ -645,7 +645,7 @@ _pure_ static const char *job_get_status_message_format(Unit *u, JobType t, JobR static const char *const generic_finished_stop_job[_JOB_RESULT_MAX] = { [JOB_DONE] = "Stopped %s.", [JOB_FAILED] = "Stopped (with error) %s.", - [JOB_TIMEOUT] = "Timed out stoppping %s.", + [JOB_TIMEOUT] = "Timed out stopping %s.", }; static const char *const generic_finished_reload_job[_JOB_RESULT_MAX] = { [JOB_DONE] = "Reloaded %s.", -- cgit v1.2.1 From b4944d2df248fbd2f96a4b9b4fe02fe0c1af7499 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 23 Mar 2016 08:46:58 +0100 Subject: logind: fix crash when shutdown is not issued from a tty It's possible that sd_bus_creds_get_tty() fails and thus scheduled_shutdown_tty is NULL in method_schedule_shutdown(). Fix logind_wall_tty_filter() to get along with that, by showing the message on all TTYs, instead of crashing in strcmp(). https://launchpad.net/bugs/1553040 --- src/login/logind-utmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/login/logind-utmp.c b/src/login/logind-utmp.c index 11a91c3947..29ab00eb1f 100644 --- a/src/login/logind-utmp.c +++ b/src/login/logind-utmp.c @@ -65,7 +65,7 @@ bool logind_wall_tty_filter(const char *tty, void *userdata) { assert(m); - if (!startswith(tty, "/dev/")) + if (!startswith(tty, "/dev/") || !m->scheduled_shutdown_tty) return true; return !streq(tty + 5, m->scheduled_shutdown_tty); -- cgit v1.2.1