mirror of
https://github.com/systemd/systemd.git
synced 2024-11-02 10:51:20 +03:00
condition: order condition types the same way in man page, enum, tables
Yes, sometimes I develop OCD.
This commit is contained in:
parent
59fccdc587
commit
651c33185e
@ -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"
|
||||
};
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user