assert(scope >= 0);
assert(scope < _LOOKUP_SCOPE_MAX);
- assert(mode < _UNIT_FILE_PRESET_MAX);
+ assert(mode < _UNIT_FILE_PRESET_MODE_MAX);
r = lookup_paths_init(&lp, scope, 0, root_dir);
if (r < 0)
assert(scope >= 0);
assert(scope < _LOOKUP_SCOPE_MAX);
- assert(mode < _UNIT_FILE_PRESET_MAX);
+ assert(mode < _UNIT_FILE_PRESET_MODE_MAX);
r = lookup_paths_init(&lp, scope, 0, root_dir);
if (r < 0)
DEFINE_STRING_TABLE_LOOKUP(install_change_type, InstallChangeType);
-static const char* const unit_file_preset_mode_table[_UNIT_FILE_PRESET_MAX] = {
+static const char* const unit_file_preset_mode_table[_UNIT_FILE_PRESET_MODE_MAX] = {
[UNIT_FILE_PRESET_FULL] = "full",
[UNIT_FILE_PRESET_ENABLE_ONLY] = "enable-only",
[UNIT_FILE_PRESET_DISABLE_ONLY] = "disable-only",
UNIT_FILE_PRESET_FULL,
UNIT_FILE_PRESET_ENABLE_ONLY,
UNIT_FILE_PRESET_DISABLE_ONLY,
- _UNIT_FILE_PRESET_MAX,
- _UNIT_FILE_PRESET_INVALID = -EINVAL,
+ _UNIT_FILE_PRESET_MODE_MAX,
+ _UNIT_FILE_PRESET_MODE_INVALID = -EINVAL,
};
enum InstallChangeType {
case ARG_PRESET_MODE:
if (streq(optarg, "help")) {
- DUMP_STRING_TABLE(unit_file_preset_mode, UnitFilePresetMode, _UNIT_FILE_PRESET_MAX);
+ DUMP_STRING_TABLE(unit_file_preset_mode, UnitFilePresetMode, _UNIT_FILE_PRESET_MODE_MAX);
return 0;
}
test_table(unit_active_state, UNIT_ACTIVE_STATE);
test_table(unit_dependency, UNIT_DEPENDENCY);
test_table(install_change_type, INSTALL_CHANGE_TYPE);
- test_table(unit_file_preset_mode, UNIT_FILE_PRESET);
+ test_table(unit_file_preset_mode, UNIT_FILE_PRESET_MODE);
test_table(unit_file_state, UNIT_FILE_STATE);
test_table(unit_load_state, UNIT_LOAD_STATE);
test_table(unit_type, UNIT_TYPE);