X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fcore%2Funit.c;h=82dd617e35175cba8a3d71adb795932d4a8db647;hp=6396bfc09f733e0734112c77147564bbd1531ace;hb=68b29a9fca915c83b9192790ec61189430cd5de6;hpb=1ca6783f5ea3755bd83e723f529c2eda512c7fed diff --git a/src/core/unit.c b/src/core/unit.c index 6396bfc09..82dd617e3 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -1438,7 +1438,10 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su check_unneeded_dependencies(u); if (ns != os && ns == UNIT_FAILED) { - log_notice("Unit %s entered failed state.", u->id); + log_struct(LOG_NOTICE, + "MESSAGE=Unit %s entered failed state", u->id, + "UNIT=%s", u->id, + NULL); unit_trigger_on_failure(u); } } @@ -1577,7 +1580,8 @@ int unit_watch_timer(Unit *u, usec_t delay, Watch *w) { } else if (w->type == WATCH_INVALID) { ours = true; - if ((fd = timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK|TFD_CLOEXEC)) < 0) + fd = timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK|TFD_CLOEXEC); + if (fd < 0) return -errno; } else assert_not_reached("Invalid watch type");