mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 03:25:20 +00: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;
|
||||
} else if (STREQ(mock, "hybrid")) {
|
||||
hybrid = true;
|
||||
} else {
|
||||
} else if (STRNEQ(mock, "legacy")) {
|
||||
fprintf(stderr, "invalid mode '%s'\n", mock);
|
||||
abort();
|
||||
}
|
||||
@ -355,7 +355,7 @@ static void init_sysfs(void)
|
||||
unified = true;
|
||||
} else if (STREQ(mock, "hybrid")) {
|
||||
hybrid = true;
|
||||
} else {
|
||||
} else if (STRNEQ(mock, "legacy")) {
|
||||
fprintf(stderr, "invalid mode '%s'\n", mock);
|
||||
abort();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user