diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-11-06 13:56:22 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-11-06 14:21:11 +0100 |
commit | 651c33185eeb449385b471fffa8882a163c496f0 (patch) | |
tree | 7fb1e0d49512d1958b0a6aa74fde154069ab242c | |
parent | 59fccdc587bc179c1638916ee16a24099f94f81f (diff) |
condition: order condition types the same way in man page, enum, tables
Yes, sometimes I develop OCD.
-rw-r--r-- | src/shared/condition-util.c | 36 | ||||
-rw-r--r-- | src/shared/condition-util.h | 22 |
2 files changed, 29 insertions, 29 deletions
diff --git a/src/shared/condition-util.c b/src/shared/condition-util.c index ee9d11ee87..5db20a7085 100644 --- a/src/shared/condition-util.c +++ b/src/shared/condition-util.c @@ -472,6 +472,15 @@ void condition_dump_list(Condition *first, FILE *f, const char *prefix, const ch } static const char* const condition_type_table[_CONDITION_TYPE_MAX] = { + [CONDITION_ARCHITECTURE] = "ConditionArchitecture", + [CONDITION_VIRTUALIZATION] = "ConditionVirtualization", + [CONDITION_HOST] = "ConditionHost", + [CONDITION_KERNEL_COMMAND_LINE] = "ConditionKernelCommandLine", + [CONDITION_SECURITY] = "ConditionSecurity", + [CONDITION_CAPABILITY] = "ConditionCapability", + [CONDITION_AC_POWER] = "ConditionACPower", + [CONDITION_NEEDS_UPDATE] = "ConditionNeedsUpdate", + [CONDITION_FIRST_BOOT] = "ConditionFirstBoot", [CONDITION_PATH_EXISTS] = "ConditionPathExists", [CONDITION_PATH_EXISTS_GLOB] = "ConditionPathExistsGlob", [CONDITION_PATH_IS_DIRECTORY] = "ConditionPathIsDirectory", @@ -481,21 +490,21 @@ static const char* const condition_type_table[_CONDITION_TYPE_MAX] = { [CONDITION_DIRECTORY_NOT_EMPTY] = "ConditionDirectoryNotEmpty", [CONDITION_FILE_NOT_EMPTY] = "ConditionFileNotEmpty", [CONDITION_FILE_IS_EXECUTABLE] = "ConditionFileIsExecutable", - [CONDITION_KERNEL_COMMAND_LINE] = "ConditionKernelCommandLine", - [CONDITION_VIRTUALIZATION] = "ConditionVirtualization", - [CONDITION_SECURITY] = "ConditionSecurity", - [CONDITION_CAPABILITY] = "ConditionCapability", - [CONDITION_HOST] = "ConditionHost", - [CONDITION_AC_POWER] = "ConditionACPower", - [CONDITION_ARCHITECTURE] = "ConditionArchitecture", - [CONDITION_NEEDS_UPDATE] = "ConditionNeedsUpdate", - [CONDITION_FIRST_BOOT] = "ConditionFirstBoot", [CONDITION_NULL] = "ConditionNull" }; DEFINE_STRING_TABLE_LOOKUP(condition_type, ConditionType); static const char* const assert_type_table[_CONDITION_TYPE_MAX] = { + [CONDITION_ARCHITECTURE] = "AssertArchitecture", + [CONDITION_VIRTUALIZATION] = "AssertVirtualization", + [CONDITION_HOST] = "AssertHost", + [CONDITION_KERNEL_COMMAND_LINE] = "AssertKernelCommandLine", + [CONDITION_SECURITY] = "AssertSecurity", + [CONDITION_CAPABILITY] = "AssertCapability", + [CONDITION_AC_POWER] = "AssertACPower", + [CONDITION_NEEDS_UPDATE] = "AssertNeedsUpdate", + [CONDITION_FIRST_BOOT] = "AssertFirstBoot", [CONDITION_PATH_EXISTS] = "AssertPathExists", [CONDITION_PATH_EXISTS_GLOB] = "AssertPathExistsGlob", [CONDITION_PATH_IS_DIRECTORY] = "AssertPathIsDirectory", @@ -505,15 +514,6 @@ static const char* const assert_type_table[_CONDITION_TYPE_MAX] = { [CONDITION_DIRECTORY_NOT_EMPTY] = "AssertDirectoryNotEmpty", [CONDITION_FILE_NOT_EMPTY] = "AssertFileNotEmpty", [CONDITION_FILE_IS_EXECUTABLE] = "AssertFileIsExecutable", - [CONDITION_KERNEL_COMMAND_LINE] = "AssertKernelCommandLine", - [CONDITION_VIRTUALIZATION] = "AssertVirtualization", - [CONDITION_SECURITY] = "AssertSecurity", - [CONDITION_CAPABILITY] = "AssertCapability", - [CONDITION_HOST] = "AssertHost", - [CONDITION_AC_POWER] = "AssertACPower", - [CONDITION_ARCHITECTURE] = "AssertArchitecture", - [CONDITION_NEEDS_UPDATE] = "AssertNeedsUpdate", - [CONDITION_FIRST_BOOT] = "AssertFirstBoot", [CONDITION_NULL] = "AssertNull" }; diff --git a/src/shared/condition-util.h b/src/shared/condition-util.h index 9aaaee9091..28d1d94ff4 100644 --- a/src/shared/condition-util.h +++ b/src/shared/condition-util.h @@ -28,7 +28,16 @@ #include "macro.h" typedef enum ConditionType { - CONDITION_NULL, + CONDITION_ARCHITECTURE, + CONDITION_VIRTUALIZATION, + CONDITION_HOST, + CONDITION_KERNEL_COMMAND_LINE, + CONDITION_SECURITY, + CONDITION_CAPABILITY, + CONDITION_AC_POWER, + + CONDITION_NEEDS_UPDATE, + CONDITION_FIRST_BOOT, CONDITION_PATH_EXISTS, CONDITION_PATH_EXISTS_GLOB, @@ -40,16 +49,7 @@ typedef enum ConditionType { CONDITION_FILE_NOT_EMPTY, CONDITION_FILE_IS_EXECUTABLE, - CONDITION_KERNEL_COMMAND_LINE, - CONDITION_VIRTUALIZATION, - CONDITION_ARCHITECTURE, - CONDITION_SECURITY, - CONDITION_CAPABILITY, - CONDITION_HOST, - CONDITION_AC_POWER, - - CONDITION_NEEDS_UPDATE, - CONDITION_FIRST_BOOT, + CONDITION_NULL, _CONDITION_TYPE_MAX, _CONDITION_TYPE_INVALID = -1 |