diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2013-02-27 22:54:14 +0100 |
---|---|---|
committer | Michal Schmidt <mschmidt@redhat.com> | 2013-02-28 02:23:21 +0100 |
commit | 49b1d377263f33991a03235779e50f61273ba649 (patch) | |
tree | b4ef93e4504d1c021af76ba6f3af37f40bc8841f /src/core/unit.c | |
parent | 6084e22e57afd588ad205697c0af119d93db1e39 (diff) |
core: redefine unit_status_printf()
Take advantage of the fact that almost all callers want to pass unit
description as the last parameter. Those who don't can use the more
flexible manager_status_printf().
Diffstat (limited to 'src/core/unit.c')
-rw-r--r-- | src/core/unit.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/unit.c b/src/core/unit.c index 74b0e47885..6fee0506d8 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -994,7 +994,7 @@ static void unit_status_print_starting_stopping(Unit *u, JobType t) { if (!format) return; - unit_status_printf(u, "", format, unit_description(u)); + unit_status_printf(u, "", format); } #pragma GCC diagnostic push @@ -2535,6 +2535,10 @@ int unit_coldplug(Unit *u) { return 0; } +void unit_status_printf(Unit *u, const char *status, const char *unit_status_msg_format) { + manager_status_printf(u->manager, false, status, unit_status_msg_format, unit_description(u)); +} + bool unit_need_daemon_reload(Unit *u) { struct stat st; |