]> git.ipfire.org Git - thirdparty/systemd.git/commit
core: always try harder to get unit status message format string
authorMichal Schmidt <mschmidt@redhat.com>
Mon, 20 Jul 2015 15:18:13 +0000 (17:18 +0200)
committerMichal Schmidt <mschmidt@redhat.com>
Tue, 21 Jul 2015 13:09:12 +0000 (15:09 +0200)
commita85ca902c9f7f5aa8f2f3e3299147733802cf09d
treebbeb7204d8b2cd2ce52b0f441b5600aaca240ecc
parent2d018ae23b838f050516d06859f50ecb9733d44b
core: always try harder to get unit status message format string

The starting/stopping messages are printed to the console only if the
corresponding format string is defined in the unit's vtable. To avoid
excessive messages on the console, the unit types whose start/stop
jobs are instantaneous had the format strings intentionally undefined.
When logging the same event to the journal, a fallback to generic
Starting/Stopping/Reloading messages is used.

The problem of excessive console messages with instantaneous jobs
is already resolved in a nicer way ("core: fix confusing logging of
instantaneous jobs"), so there's no longer a need to have two ways of
getting the format strings. Let's fold them into one function with
the fallback to generic message strings.
src/core/unit.c