Merge pull request #22952 from poettering/rework-kvm-hyperv

virt: tweak kvm with hyperv enlightenments
This commit is contained in:
Yu Watanabe
2022-04-04 22:53:56 +09:00
committed by GitHub
9 changed files with 146 additions and 138 deletions
+3 -2
View File
@@ -459,7 +459,8 @@ static int condition_test_group(Condition *c, char **env) {
}
static int condition_test_virtualization(Condition *c, char **env) {
int b, v;
Virtualization v;
int b;
assert(c);
assert(c->parameter);
@@ -475,7 +476,7 @@ static int condition_test_virtualization(Condition *c, char **env) {
/* First, compare with yes/no */
b = parse_boolean(c->parameter);
if (b >= 0)
return b == !!v;
return b == (v != VIRTUALIZATION_NONE);
/* Then, compare categorization */
if (streq(c->parameter, "vm"))