From 39b50ad105bdc4285d197809436c30595ef6ef12 Mon Sep 17 00:00:00 2001 From: Evgeny Vereshchagin Date: Wed, 9 Sep 2015 14:51:58 +0300 Subject: notify: log error when sd_pid_notify() == 0 --- src/notify/notify.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/notify/notify.c') diff --git a/src/notify/notify.c b/src/notify/notify.c index c920b29297..c303bcf718 100644 --- a/src/notify/notify.c +++ b/src/notify/notify.c @@ -195,10 +195,10 @@ int main(int argc, char* argv[]) { if (r < 0) { log_error_errno(r, "Failed to notify init system: %m"); goto finish; - } - - if (r == 0) + } else if (r == 0) { + log_error("No status data could be sent: $NOTIFY_SOCKET was not set"); r = -EOPNOTSUPP; + } finish: return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS; -- cgit v1.2.3-54-g00ecf