diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2012-11-15 11:54:57 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2012-11-15 11:54:57 +0100 |
commit | 45c0c61df3c63cb1f20505c8d292385d5e300578 (patch) | |
tree | 4cdfaeae4f2d51449543bf51dc07bda2db68a1ef /src/shared | |
parent | 48c2826b4ea686cd69e489f9c6fe2d9ddebb6a69 (diff) |
systemctl: add help for --type/-t
The list of types and load states if lengthy, so a little reminder
can be sometimes useful.
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/unit-name.c | 4 | ||||
-rw-r--r-- | src/shared/unit-name.h | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/shared/unit-name.c b/src/shared/unit-name.c index 50031e608e..88ca0b8f2c 100644 --- a/src/shared/unit-name.c +++ b/src/shared/unit-name.c @@ -33,7 +33,7 @@ "ABCDEFGHIJKLMNOPQRSTUVWXYZ" \ ":-_.\\" -static const char* const unit_type_table[_UNIT_TYPE_MAX] = { +const char* const unit_type_table[_UNIT_TYPE_MAX] = { [UNIT_SERVICE] = "service", [UNIT_SOCKET] = "socket", [UNIT_TARGET] = "target", @@ -48,7 +48,7 @@ static const char* const unit_type_table[_UNIT_TYPE_MAX] = { DEFINE_STRING_TABLE_LOOKUP(unit_type, UnitType); -static const char* const unit_load_state_table[_UNIT_LOAD_STATE_MAX] = { +const char* const unit_load_state_table[_UNIT_LOAD_STATE_MAX] = { [UNIT_STUB] = "stub", [UNIT_LOADED] = "loaded", [UNIT_ERROR] = "error", diff --git a/src/shared/unit-name.h b/src/shared/unit-name.h index 7be346590e..d7528a3ac7 100644 --- a/src/shared/unit-name.h +++ b/src/shared/unit-name.h @@ -44,7 +44,7 @@ enum UnitType { }; enum UnitLoadState { - UNIT_STUB, + UNIT_STUB = 0, UNIT_LOADED, UNIT_ERROR, UNIT_MERGED, @@ -53,9 +53,11 @@ enum UnitLoadState { _UNIT_LOAD_STATE_INVALID = -1 }; +extern const char* const unit_type_table[]; const char *unit_type_to_string(UnitType i); UnitType unit_type_from_string(const char *s); +extern const char* const unit_load_state_table[]; const char *unit_load_state_to_string(UnitLoadState i); UnitLoadState unit_load_state_from_string(const char *s); |