mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-09 01:18:00 +03:00
vircgroupmock: fix cgroup v1 mocking
The `legacy` mode is also valid so we need to take it into account as well. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
f53988d657
commit
76ff847386
@ -317,7 +317,7 @@ static int make_controller(const char *path, mode_t mode)
|
|||||||
unified = true;
|
unified = true;
|
||||||
} else if (STREQ(mock, "hybrid")) {
|
} else if (STREQ(mock, "hybrid")) {
|
||||||
hybrid = true;
|
hybrid = true;
|
||||||
} else {
|
} else if (STRNEQ(mock, "legacy")) {
|
||||||
fprintf(stderr, "invalid mode '%s'\n", mock);
|
fprintf(stderr, "invalid mode '%s'\n", mock);
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
@ -355,7 +355,7 @@ static void init_sysfs(void)
|
|||||||
unified = true;
|
unified = true;
|
||||||
} else if (STREQ(mock, "hybrid")) {
|
} else if (STREQ(mock, "hybrid")) {
|
||||||
hybrid = true;
|
hybrid = true;
|
||||||
} else {
|
} else if (STRNEQ(mock, "legacy")) {
|
||||||
fprintf(stderr, "invalid mode '%s'\n", mock);
|
fprintf(stderr, "invalid mode '%s'\n", mock);
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user