Commit b7f0af3a authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

criu: cgroup -- Don't use PAGE_SIZE inside parasite args

This cause problem on ppc64

 | gcc -c -O2 -g -Wall -Werror -DCONFIG_PPC64 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
 | -fno-strict-aliasing -iquote /home/cyrill/criu/criu/include -iquote /home/cyrill/criu/images
 | -iquote /home/cyrill/criu/criu/pie -iquote /home/cyrill/criu/criu/arch/ppc64
 | -iquote /home/cyrill/criu/criu/arch/ppc64/include -iquote /home/cyrill/criu/ -I/usr/include/libnl3
 | -iquote ppc64 -DCONFIG_PPC64 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE parasite-syscall.c -o parasite-syscall.o
 | parasite-syscall.c: In function ‘parasite_dump_cgroup’:
 | parasite-syscall.c:1283:2: error: size of unnamed array is negative
 |   ca = parasite_args(ctl, struct parasite_dump_cgroup_args);
 |   ^
 | /home/cyrill/criu/scripts/nmk/scripts/rules.mk:53: recipe for target 'parasite-syscall.o' failed

Just use size parasite known to support.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Acked-by: 's avatarLaurent Dufour <ldufour@linux.vnet.ibm.com>
Acked-by: 's avatarTycho Andersen <tycho.andersen@canonical.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent e4dd8d2b
...@@ -247,13 +247,12 @@ struct parasite_tty_args { ...@@ -247,13 +247,12 @@ struct parasite_tty_args {
}; };
struct parasite_dump_cgroup_args { struct parasite_dump_cgroup_args {
/* We choose PAGE_SIZE here since that's how big parasite messages are, /*
* although this is probably longer than any /proc/pid/cgroup file will * 4K should be enough for most cases.
* ever be on most systems (4k).
* *
* The string is null terminated. * The string is null terminated.
*/ */
char contents[PAGE_SIZE]; char contents[PARASITE_ARG_SIZE_MIN];
}; };
/* the parasite prefix is added by gen_offsets.sh */ /* the parasite prefix is added by gen_offsets.sh */
......
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