From c69182961b00707d977957cf81d5c41cfbeab429 Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Sun, 13 May 2012 18:18:54 +0200 Subject: unit: unit type dependent status messages Instead of generic "Starting..." and "Started" messages for all unit use type-dependent messages. For example, mounts will announce "Mounting..." and "Mounted". Add status messages to units of types that used to be entirely silent (automounts, sockets, targets, devices). For unit types whose jobs are instantaneous, report only the job completion, not the starting event. Socket units with non-instantaneous jobs are rare (Exec*= is not used often in socket units), so I chose not to print the starting messages for them either. This will hopefully give people better understanding of the boot. --- src/core/swap.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'src/core/swap.c') diff --git a/src/core/swap.c b/src/core/swap.c index a7e2126edd..ba4413bd3c 100644 --- a/src/core/swap.c +++ b/src/core/swap.c @@ -1378,7 +1378,6 @@ const UnitVTable swap_vtable = { .no_alias = true, .no_instances = true, - .show_status = true, .init = swap_init, .load = swap_load, @@ -1414,5 +1413,23 @@ const UnitVTable swap_vtable = { .following_set = swap_following_set, .enumerate = swap_enumerate, - .shutdown = swap_shutdown + .shutdown = swap_shutdown, + + .status_message_formats = { + .starting_stopping = { + [0] = "Activating swap %s...", + [1] = "Deactivating swap %s...", + }, + .finished_start_job = { + [JOB_DONE] = "Activated swap %s.", + [JOB_FAILED] = "Failed to activate swap %s.", + [JOB_DEPENDENCY] = "Dependency failed for %s.", + [JOB_TIMEOUT] = "Timed out activating swap %s.", + }, + .finished_stop_job = { + [JOB_DONE] = "Deactivated swap %s.", + [JOB_FAILED] = "Failed deactivating swap %s.", + [JOB_TIMEOUT] = "Timed out deactivating swap %s.", + }, + }, }; -- cgit v1.2.3-54-g00ecf