criu: fix internal representation of cgroups hierarchical structure

strstartswith() function is incorrect choice for finding parent
directory so i change it to issubpath() function

Signed-off-by: Dmitrii Chervov <dschervov1@yandex.ru>
This commit is contained in:
dschervov 2025-02-05 20:04:37 +03:00 committed by Andrei Vagin
parent b7fa7d304c
commit 030fa4affd

View file

@ -248,7 +248,7 @@ static int find_dir(const char *path, struct list_head *dirs, struct cgroup_dir
return EXACT_MATCH;
}
if (strstartswith(path, d->path)) {
if (issubpath(path, d->path)) {
int ret = find_dir(path, &d->children, rdir);
if (ret == NO_MATCH) {
*rdir = d;