chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
main: add a few more useful diagnostic log messages
[elogind.git]
/
src
/
unit.c
diff --git
a/src/unit.c
b/src/unit.c
index a5f8712ae6d1101b358ad092095b4bfa6c002ea5..c287310a48908474c778d66291164a0218a2c99e 100644
(file)
--- a/
src/unit.c
+++ b/
src/unit.c
@@
-970,6
+970,9
@@
void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns) {
else if (UNIT_IS_ACTIVE_OR_RELOADING(os) && !UNIT_IS_ACTIVE_OR_RELOADING(ns))
u->meta.active_exit_timestamp = ts;
else if (UNIT_IS_ACTIVE_OR_RELOADING(os) && !UNIT_IS_ACTIVE_OR_RELOADING(ns))
u->meta.active_exit_timestamp = ts;
+ if (ns != os && ns == UNIT_MAINTENANCE)
+ log_notice("Unit %s entered maintenance state.", u->meta.id);
+
timer_unit_notify(u, ns);
path_unit_notify(u, ns);
timer_unit_notify(u, ns);
path_unit_notify(u, ns);