summaryrefslogtreecommitdiff
path: root/src/shared/install.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2022-10-14 11:12:19 +0200
committerLennart Poettering <lennart@poettering.net>2022-10-14 11:41:32 +0200
commitb364c4de6289003e5f431f865a0ded73f44f6f29 (patch)
tree5b22e0f6ad5a0e1d7b5dbae098f80ce4a0ac5174 /src/shared/install.c
parentf8662fee2fac735385dc060f1435e4af5327138d (diff)
downloadsystemd-b364c4de6289003e5f431f865a0ded73f44f6f29.tar.gz
install: include full type name in special UnitFilePresetMode values
Typically the _MAX and _INVALID special enum values use the full type as prefix, even if the actual values of the enum might not. Let's follow this rule here too.
Diffstat (limited to 'src/shared/install.c')
-rw-r--r--src/shared/install.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shared/install.c b/src/shared/install.c
index 43aa865b0e..53b5aefbe6 100644
--- a/src/shared/install.c
+++ b/src/shared/install.c
@@ -3471,7 +3471,7 @@ int unit_file_preset(
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)
@@ -3510,7 +3510,7 @@ int unit_file_preset_all(
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)
@@ -3674,7 +3674,7 @@ static const char* const install_change_type_table[_INSTALL_CHANGE_TYPE_MAX] = {
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",