void *userdata) {
Unit *u = data;
- bool negate;
+ bool trigger, negate;
Condition *c;
assert(filename);
assert(rvalue);
assert(data);
+ if ((trigger = rvalue[0] == '|'))
+ rvalue++;
+
if ((negate = rvalue[0] == '!'))
rvalue++;
}
if (!(c = condition_new(streq(lvalue, "ConditionPathExists") ? CONDITION_PATH_EXISTS : CONDITION_DIRECTORY_NOT_EMPTY,
- rvalue, negate)))
+ rvalue, trigger, negate)))
return -ENOMEM;
LIST_PREPEND(Condition, conditions, u->meta.conditions, c);
void *userdata) {
Unit *u = data;
- bool negate;
+ bool trigger, negate;
Condition *c;
assert(filename);
assert(rvalue);
assert(data);
+ if ((trigger = rvalue[0] == '|'))
+ rvalue++;
+
if ((negate = rvalue[0] == '!'))
rvalue++;
- if (!(c = condition_new(CONDITION_KERNEL_COMMAND_LINE, rvalue, negate)))
+ if (!(c = condition_new(CONDITION_KERNEL_COMMAND_LINE, rvalue, trigger, negate)))
return -ENOMEM;
LIST_PREPEND(Condition, conditions, u->meta.conditions, c);
void *userdata) {
Unit *u = data;
- bool negate;
+ bool trigger, negate;
Condition *c;
assert(filename);
assert(rvalue);
assert(data);
+ if ((trigger = rvalue[0] == '|'))
+ rvalue++;
+
if ((negate = rvalue[0] == '!'))
rvalue++;
- if (!(c = condition_new(CONDITION_VIRTUALIZATION, rvalue, negate)))
+ if (!(c = condition_new(CONDITION_VIRTUALIZATION, rvalue, trigger, negate)))
return -ENOMEM;
LIST_PREPEND(Condition, conditions, u->meta.conditions, c);
Unit *u = data;
Condition *c;
- bool negate;
+ bool trigger, negate;
int b;
assert(filename);
assert(rvalue);
assert(data);
+ if ((trigger = rvalue[0] == '|'))
+ rvalue++;
+
if ((negate = rvalue[0] == '!'))
rvalue++;
if (!b)
negate = !negate;
- if (!(c = condition_new(CONDITION_NULL, NULL, negate)))
+ if (!(c = condition_new(CONDITION_NULL, NULL, trigger, negate)))
return -ENOMEM;
LIST_PREPEND(Condition, conditions, u->meta.conditions, c);