2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-29 13:28:27 +00:00

zdtm/cgroup: Fix misnamed array deny => dev_allow

Those are devices which are written to devices.allow cgroup.

Signed-off-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
Dmitry Safonov 2017-07-26 00:08:15 +03:00 committed by Andrei Vagin
parent 334c379261
commit 0f9ed59527

View File

@ -115,7 +115,7 @@ int main(int argc, char **argv)
char buf[1024], path[PATH_MAX];
struct stat sb;
char *deny[] = {
char *dev_allow[] = {
"c *:* m",
"b *:* m",
"c 1:3 rwm",
@ -136,8 +136,8 @@ int main(int argc, char **argv)
/* need to allow /dev/null for restore */
sprintf(path, "%s/devices/%s/devices.allow", dirname, cgname);
for (i = 0; i < ARRAY_SIZE(deny); i++) {
if (write_value(path, deny[i]) < 0)
for (i = 0; i < ARRAY_SIZE(dev_allow); i++) {
if (write_value(path, dev_allow[i]) < 0)
goto out;
}
@ -148,8 +148,8 @@ int main(int argc, char **argv)
test_waitsig();
buf[0] = 0;
for (i = 0; i < ARRAY_SIZE(deny); i++) {
strcat(buf, deny[i]);
for (i = 0; i < ARRAY_SIZE(dev_allow); i++) {
strcat(buf, dev_allow[i]);
strcat(buf, "\n");
}