summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-02-21 02:06:04 +0100
committerLennart Poettering <lennart@poettering.net>2014-02-21 02:43:14 +0100
commit099524d7b0df690e3361ffc3fe3c6aed0558b4fc (patch)
tree9983d7ff3452ce44a2a8150e124d01e998f8dbd9 /src/core
parenta03c5fd2d86c4e3f758a5ca0d98638e5c8bd8d8d (diff)
core: add new ConditionArchitecture() that checks the architecture returned by uname()'s machine field.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/condition.c3
-rw-r--r--src/core/load-fragment-gperf.gperf.m41
2 files changed, 4 insertions, 0 deletions
diff --git a/src/core/condition.c b/src/core/condition.c
index 658e8d6a4c..1448fa19dc 100644
--- a/src/core/condition.c
+++ b/src/core/condition.c
@@ -167,6 +167,9 @@ static bool condition_test(Condition *c) {
case CONDITION_AC_POWER:
return condition_test_ac_power(c);
+ case CONDITION_ARCHITECTURE:
+ return condition_test_architecture(c);
+
case CONDITION_NULL:
return !c->negate;
diff --git a/src/core/load-fragment-gperf.gperf.m4 b/src/core/load-fragment-gperf.gperf.m4
index 1c2c142eec..e9995bf0c7 100644
--- a/src/core/load-fragment-gperf.gperf.m4
+++ b/src/core/load-fragment-gperf.gperf.m4
@@ -153,6 +153,7 @@ Unit.ConditionDirectoryNotEmpty, config_parse_unit_condition_path, CONDITION_D
Unit.ConditionFileNotEmpty, config_parse_unit_condition_path, CONDITION_FILE_NOT_EMPTY, 0
Unit.ConditionFileIsExecutable, config_parse_unit_condition_path, CONDITION_FILE_IS_EXECUTABLE, 0
Unit.ConditionKernelCommandLine, config_parse_unit_condition_string, CONDITION_KERNEL_COMMAND_LINE, 0
+Unit.ConditionArchitecture, config_parse_unit_condition_string, CONDITION_ARCHITECTURE, 0
Unit.ConditionVirtualization, config_parse_unit_condition_string, CONDITION_VIRTUALIZATION, 0
Unit.ConditionSecurity, config_parse_unit_condition_string, CONDITION_SECURITY, 0
Unit.ConditionCapability, config_parse_unit_condition_string, CONDITION_CAPABILITY, 0