mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 18:25:14 +00:00
We want to have buffered images to speed up dump and, slightly, restore. Right now we use plan file descriptors to write and read images to/from. Making them buffered cannot be gracefully done on plain fds, so introduce a new class. This will also help if (when?) we will want to do more complex changes with images, e.g. store them all in one file or send them directly to the network. For now the cr_img just contains one int _fd variable. This patch chages the prototype of open_image() to return struct cr_img *, pb_(read|write)* to accept one and fixes the compilation of the rest of the code :) Signed-off-by: Pavel Emelyanov <xemul@parallels.com> Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
25 lines
644 B
C
25 lines
644 B
C
#ifndef __CR_SHOW_H__
|
|
#define __CR_SHOW_H__
|
|
|
|
#include <stdbool.h>
|
|
#include "asm/types.h"
|
|
|
|
struct cr_img;
|
|
|
|
struct show_image_info {
|
|
u32 magic;
|
|
int pb_type;
|
|
bool single;
|
|
void (*payload)(struct cr_img *, void *);
|
|
char *fmt;
|
|
};
|
|
|
|
extern void show_siginfo(struct cr_img *);
|
|
extern void sk_queue_data_handler(struct cr_img *, void *obj);
|
|
extern void ipc_shm_handler(struct cr_img *, void *obj);
|
|
extern void ipc_msg_handler(struct cr_img *, void *obj);
|
|
extern void ipc_sem_handler(struct cr_img *, void *obj);
|
|
extern int cr_parse_fd(struct cr_img *, u32 magic);
|
|
extern void show_tcp_stream(struct cr_img *, void *obj);
|
|
|
|
#endif /* __CR_SHOW_H__ */
|