Commit 20578e63 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

zdtm/ipc_namespaces: don't extra symbols in a sysctl file

The kernel has a bug in handling auto_msgmni and if we send extra
symbols, a new value isn't applied.
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 67050512
...@@ -207,7 +207,7 @@ static int rand_ipc_sysctl(char *name, unsigned int val) ...@@ -207,7 +207,7 @@ static int rand_ipc_sysctl(char *name, unsigned int val)
return fd; return fd;
} }
sprintf(buf, "%d\n", val); sprintf(buf, "%d\n", val);
ret = write(fd, buf, 32); ret = write(fd, buf, strlen(buf));
if (ret < 0) { if (ret < 0) {
err("Can't write %u into %s\n", val, name); err("Can't write %u into %s\n", val, name);
return -errno; return -errno;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment