]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
notify: log error when sd_pid_notify() == 0 1213/head
authorEvgeny Vereshchagin <evvers@ya.ru>
Wed, 9 Sep 2015 11:51:58 +0000 (14:51 +0300)
committerEvgeny Vereshchagin <evvers@ya.ru>
Wed, 9 Sep 2015 11:55:13 +0000 (14:55 +0300)
src/notify/notify.c

index c920b2929721ed7565fb1498b0c93e8da73c4c47..c303bcf7183b58733026ee90c042e014f18bc19a 100644 (file)
@@ -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;