mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 06:15:24 +00:00
restore: We should check for error returned in get_image_path
This as well implies we change paths to PATH_MAX size. Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Acked-by: Pavel Emelianov <xemul@parallels.com>
This commit is contained in:
@@ -59,10 +59,10 @@ struct cr_fd_desc_tmpl {
|
||||
#define FMT_FNAME_SIGACTS "sigacts-%d.img"
|
||||
|
||||
extern int get_image_path(char *path, int size, const char *fmt, int pid);
|
||||
#define IMAGE_PATH(path, fmt, pid) get_image_path(path, sizeof(path), fmt, pid);
|
||||
|
||||
extern char image_dir[];
|
||||
#define open_image_ro(fmt, ...) open_fmt("%s/" fmt, O_RDONLY, image_dir, __VA_ARGS__)
|
||||
#define open_image_ro(fmt, ...) \
|
||||
open_fmt("%s/" fmt, O_RDONLY, image_dir, __VA_ARGS__)
|
||||
|
||||
#define LAST_PID_PATH "/proc/sys/kernel/ns_last_pid"
|
||||
#define LAST_PID_PERM 0666
|
||||
|
Reference in New Issue
Block a user