[CRIU] [PATCH 10/11] zdtm/cgroup: Fix misnamed array deny => dev_allow

Dmitry Safonov dsafonov at virtuozzo.com
Wed Jul 26 00:08:15 MSK 2017


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

Signed-off-by: Dmitry Safonov <dsafonov at virtuozzo.com>
---
 test/zdtm/static/cgroup04.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/test/zdtm/static/cgroup04.c b/test/zdtm/static/cgroup04.c
index 812a9a3c2683..6998358ef6ea 100644
--- a/test/zdtm/static/cgroup04.c
+++ b/test/zdtm/static/cgroup04.c
@@ -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");
 	}
 
-- 
2.13.3



More information about the CRIU mailing list