summaryrefslogtreecommitdiff
path: root/src/core/unit.h
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/unit.h
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/unit.h')
-rw-r--r--src/core/unit.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/core/unit.h b/src/core/unit.h
index 33920892fd..e8e6b09866 100644
--- a/src/core/unit.h
+++ b/src/core/unit.h
@@ -32,6 +32,7 @@ typedef enum UnitLoadState UnitLoadState;
typedef enum UnitActiveState UnitActiveState;
typedef enum UnitDependency UnitDependency;
typedef struct UnitRef UnitRef;
+typedef struct UnitStatusMessageFormats UnitStatusMessageFormats;
#include "set.h"
#include "util.h"
@@ -266,6 +267,12 @@ struct UnitRef {
LIST_FIELDS(UnitRef, refs);
};
+struct UnitStatusMessageFormats {
+ const char *starting_stopping[2];
+ const char *finished_start_job[_JOB_RESULT_MAX];
+ const char *finished_stop_job[_JOB_RESULT_MAX];
+};
+
#include "service.h"
#include "timer.h"
#include "socket.h"
@@ -392,6 +399,8 @@ struct UnitVTable {
/* The interface name */
const char *bus_interface;
+ UnitStatusMessageFormats status_message_formats;
+
/* Can units of this type have multiple names? */
bool no_alias:1;
@@ -400,9 +409,6 @@ struct UnitVTable {
/* Exclude from automatic gc */
bool no_gc:1;
-
- /* Show status updates on the console */
- bool show_status:1;
};
extern const UnitVTable * const unit_vtable[_UNIT_TYPE_MAX];