diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2012-07-10 17:18:09 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-07-10 17:18:49 +0200 |
commit | f69614f811b133ececad4394e88f9549a017bd4e (patch) | |
tree | 056a308e4aa1eba68fd296238daacfd78833dee2 /src/shared/unit-name.c | |
parent | bcbe497e5a73d889e8799f8a3680c303afede347 (diff) |
unit: Move UnitLoadState definitions from core/unit.c to shared/unit-name.c
This makes it possible to use them from systemctl without linking
against the core.
Diffstat (limited to 'src/shared/unit-name.c')
-rw-r--r-- | src/shared/unit-name.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/shared/unit-name.c b/src/shared/unit-name.c index cbe0b05377..3e437b77a1 100644 --- a/src/shared/unit-name.c +++ b/src/shared/unit-name.c @@ -48,6 +48,16 @@ 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] = { + [UNIT_STUB] = "stub", + [UNIT_LOADED] = "loaded", + [UNIT_ERROR] = "error", + [UNIT_MERGED] = "merged", + [UNIT_MASKED] = "masked" +}; + +DEFINE_STRING_TABLE_LOOKUP(unit_load_state, UnitLoadState); + bool unit_name_is_valid(const char *n, bool template_ok) { const char *e, *i, *at; |