Merge pull request #9157 from poettering/unit-config-load-error
introduce a new "bad-setting" unit load state in order to improve "systemctl status" output when bad settings are used
This commit is contained in:
@@ -93,6 +93,7 @@ static const char* const unit_load_state_table[_UNIT_LOAD_STATE_MAX] = {
|
||||
[UNIT_STUB] = "stub",
|
||||
[UNIT_LOADED] = "loaded",
|
||||
[UNIT_NOT_FOUND] = "not-found",
|
||||
[UNIT_BAD_SETTING] = "bad-setting",
|
||||
[UNIT_ERROR] = "error",
|
||||
[UNIT_MERGED] = "merged",
|
||||
[UNIT_MASKED] = "masked"
|
||||
|
||||
@@ -30,8 +30,9 @@ typedef enum UnitType {
|
||||
typedef enum UnitLoadState {
|
||||
UNIT_STUB = 0,
|
||||
UNIT_LOADED,
|
||||
UNIT_NOT_FOUND,
|
||||
UNIT_ERROR,
|
||||
UNIT_NOT_FOUND, /* error condition #1: unit file not found */
|
||||
UNIT_BAD_SETTING, /* error condition #2: we couldn't parse some essential unit file setting */
|
||||
UNIT_ERROR, /* error condition #3: other "system" error, catchall for the rest */
|
||||
UNIT_MERGED,
|
||||
UNIT_MASKED,
|
||||
_UNIT_LOAD_STATE_MAX,
|
||||
|
||||
Reference in New Issue
Block a user