vici: Make combination of 'trap' and 'start' configurable

This commit is contained in:
Tobias Brunner
2022-04-14 18:42:01 +02:00
parent 7137fd96c2
commit c00c5e5a35
2 changed files with 17 additions and 4 deletions
+9
View File
@@ -1011,6 +1011,7 @@ CALLBACK(parse_action, bool,
{ "none", ACTION_NONE },
{ "clear", ACTION_NONE },
};
char buf[BUF_LEN];
int d;
if (parse_map(map, countof(map), &d, v))
@@ -1018,6 +1019,14 @@ CALLBACK(parse_action, bool,
*out = d;
return TRUE;
}
if (!vici_stringify(v, buf, sizeof(buf)))
{
return FALSE;
}
if (enum_flags_from_string(action_names, buf, out))
{
return TRUE;
}
return FALSE;
}