summaryrefslogtreecommitdiff
path: root/src/core/automount.c
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2012-05-13 18:18:54 +0200
committerMichal Schmidt <mschmidt@redhat.com>2012-05-14 14:29:53 +0200
commitc69182961b00707d977957cf81d5c41cfbeab429 (patch)
tree0fea4038b59b5c82f71686c0ca50d118da983699 /src/core/automount.c
parent9ab7a8d2a30f440c008d127113419030e4572cb4 (diff)
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.
Diffstat (limited to 'src/core/automount.c')
-rw-r--r--src/core/automount.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/core/automount.c b/src/core/automount.c
index c31e3d8bac..f190417fa3 100644
--- a/src/core/automount.c
+++ b/src/core/automount.c
@@ -885,5 +885,17 @@ const UnitVTable automount_vtable = {
.bus_message_handler = bus_automount_message_handler,
.bus_invalidating_properties = bus_automount_invalidating_properties,
- .shutdown = automount_shutdown
+ .shutdown = automount_shutdown,
+
+ .status_message_formats = {
+ .finished_start_job = {
+ [JOB_DONE] = "Set up automount %s.",
+ [JOB_FAILED] = "Failed to set up automount %s.",
+ [JOB_DEPENDENCY] = "Dependency failed for %s.",
+ },
+ .finished_stop_job = {
+ [JOB_DONE] = "Unset automount %s.",
+ [JOB_FAILED] = "Failed to unset automount %s.",
+ },
+ },
};