mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-29 05:18:00 +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:
parent
334c379261
commit
0f9ed59527
@ -115,7 +115,7 @@ int main(int argc, char **argv)
|
|||||||
char buf[1024], path[PATH_MAX];
|
char buf[1024], path[PATH_MAX];
|
||||||
struct stat sb;
|
struct stat sb;
|
||||||
|
|
||||||
char *deny[] = {
|
char *dev_allow[] = {
|
||||||
"c *:* m",
|
"c *:* m",
|
||||||
"b *:* m",
|
"b *:* m",
|
||||||
"c 1:3 rwm",
|
"c 1:3 rwm",
|
||||||
@ -136,8 +136,8 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
/* need to allow /dev/null for restore */
|
/* need to allow /dev/null for restore */
|
||||||
sprintf(path, "%s/devices/%s/devices.allow", dirname, cgname);
|
sprintf(path, "%s/devices/%s/devices.allow", dirname, cgname);
|
||||||
for (i = 0; i < ARRAY_SIZE(deny); i++) {
|
for (i = 0; i < ARRAY_SIZE(dev_allow); i++) {
|
||||||
if (write_value(path, deny[i]) < 0)
|
if (write_value(path, dev_allow[i]) < 0)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -148,8 +148,8 @@ int main(int argc, char **argv)
|
|||||||
test_waitsig();
|
test_waitsig();
|
||||||
|
|
||||||
buf[0] = 0;
|
buf[0] = 0;
|
||||||
for (i = 0; i < ARRAY_SIZE(deny); i++) {
|
for (i = 0; i < ARRAY_SIZE(dev_allow); i++) {
|
||||||
strcat(buf, deny[i]);
|
strcat(buf, dev_allow[i]);
|
||||||
strcat(buf, "\n");
|
strcat(buf, "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user