mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 22:05:36 +00:00
cgroup: fix "unified" path
The code expected that the cgroup directory ends with a ',' and unconditionally removes the last character. For the "unified" case this resulted in the last 'd' being remove instead of the non existing comma. This just adds a comma after "unified" so that the last removed character is not the 'd'. Suggested-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Signed-off-by: Adrian Reber <areber@redhat.com>
This commit is contained in:
committed by
Andrei Vagin
parent
8ddd7f4837
commit
c71d4a54a3
@@ -1035,7 +1035,7 @@ static int ctrl_dir_and_opt(CgControllerEntry *ctl, char *dir, int ds, char *opt
|
||||
}
|
||||
|
||||
if (n[0] == 0)
|
||||
doff += snprintf(dir + doff, ds - doff, "unified");
|
||||
doff += snprintf(dir + doff, ds - doff, "unified,");
|
||||
else
|
||||
doff += snprintf(dir + doff, ds - doff, "%s,", n);
|
||||
if (opt)
|
||||
|
Reference in New Issue
Block a user