criu/include/crtools.h
Andrey Vagin 4864996ed8 dump: write an inventory image after dumping all processes
Currently if criu segfaulted, the inventory image isn't removed and
we can't detect that images are incomplete.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-12-29 14:50:38 +03:00

32 lines
818 B
C

#ifndef __CR_CRTOOLS_H__
#define __CR_CRTOOLS_H__
#include <sys/types.h>
#include "list.h"
#include "asm/types.h"
#include "servicefd.h"
#include "protobuf.h"
#include "protobuf/inventory.pb-c.h"
#define CR_FD_PERM (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)
extern int check_img_inventory(void);
extern int write_img_inventory(InventoryEntry *he);
extern int prepare_inventory(InventoryEntry *he);
#define LAST_PID_PATH "sys/kernel/ns_last_pid"
extern int cr_dump_tasks(pid_t pid);
extern int cr_pre_dump_tasks(pid_t pid);
extern int cr_restore_tasks(void);
extern int cr_show(int pid);
extern int convert_to_elf(char *elf_path, int fd_core);
extern int cr_check(void);
extern int cr_exec(int pid, char **opts);
extern int cr_dedup(void);
extern int check_add_feature(char *arg);
#endif /* __CR_CRTOOLS_H__ */