mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-22 01:51:51 +00:00
A short story -- there were a long conversation on which format should be used to keep checkpointed data on disk image. We ended up in using Google's Protocol Buffers (see https://developers.google.com/protocol-buffers/ for detailed description). Thus image entries should be convered to PB. This patch converts fdinfo_entry to PB "message fdinfo_entry". Build note: one should have protobuf and protobuf-c installed to be able to build crtools. - http://code.google.com/p/protobuf/ - http://code.google.com/p/protobuf-c/ Inspired-by: Pavel Emelianov <xemul@parallels.com> Inspired-by: Kinsbursky Stanislav <skinsbursky@openvz.org> Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
22 lines
466 B
C
22 lines
466 B
C
#ifndef FILE_IDS_H__
|
|
#define FILE_IDS_H__
|
|
|
|
#include "compiler.h"
|
|
#include "types.h"
|
|
#include "rbtree.h"
|
|
|
|
#include "../protobuf/fdinfo.pb-c.h"
|
|
|
|
#define FD_PID_INVALID (-2U)
|
|
#define FD_DESC_INVALID (-3U)
|
|
|
|
#define MAKE_FD_GENID(dev, ino, pos) \
|
|
(((u32)(dev) ^ (u32)(ino) ^ (u32)(pos)))
|
|
|
|
struct fdinfo_entry;
|
|
extern int fd_id_generate(pid_t pid, FdinfoEntry *fe);
|
|
extern u32 fd_id_generate_special(void);
|
|
extern void fd_id_show_tree(void);
|
|
|
|
#endif /* FILE_IDS_H__ */
|