mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 13:58:34 +00:00
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: Cyrill Gorcunov <gorcunov@openvz.org> Acked-by: Laurent Dufour <ldufour@linux.vnet.ibm.com> Acked-by: Tycho Andersen <tycho.andersen@canonical.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
e4dd8d2b12
commit
b7f0af3ac9
@@ -247,13 +247,12 @@ struct parasite_tty_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
|
||||
* ever be on most systems (4k).
|
||||
/*
|
||||
* 4K should be enough for most cases.
|
||||
*
|
||||
* The string is null terminated.
|
||||
*/
|
||||
char contents[PAGE_SIZE];
|
||||
char contents[PARASITE_ARG_SIZE_MIN];
|
||||
};
|
||||
|
||||
/* the parasite prefix is added by gen_offsets.sh */
|
||||
|
Reference in New Issue
Block a user