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: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Andrey Vagin 2014-08-13 17:51:02 +04:00 committed by Pavel Emelyanov
parent 6705051282
commit 20578e63cf

View file

@ -207,7 +207,7 @@ static int rand_ipc_sysctl(char *name, unsigned int val)
return fd;
}
sprintf(buf, "%d\n", val);
ret = write(fd, buf, 32);
ret = write(fd, buf, strlen(buf));
if (ret < 0) {
err("Can't write %u into %s\n", val, name);
return -errno;