man: consolidate list of active unit states into a shared table

Avoids the need to maintain the same list over and over again, and
link it to the defition table in the implementation as a reminder
too
This commit is contained in:
Luca Boccassi
2024-10-04 12:22:55 +02:00
committed by Zbigniew Jędrzejewski-Szmek
parent 2f8ac1c4c7
commit 3509fe124d
5 changed files with 79 additions and 28 deletions
+1
View File
@@ -104,6 +104,7 @@ static const char* const unit_load_state_table[_UNIT_LOAD_STATE_MAX] = {
DEFINE_STRING_TABLE_LOOKUP(unit_load_state, UnitLoadState);
/* Keep in sync with man/unit-states.xml */
static const char* const unit_active_state_table[_UNIT_ACTIVE_STATE_MAX] = {
[UNIT_ACTIVE] = "active",
[UNIT_RELOADING] = "reloading",