mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-01 06:45:35 +00:00
protobuf: add a new description for saving file-lock
We need a new protobuf description for file-lock. Originally-signed-off-by: Zheng Gu <cengku.gu@huawei.com> Signed-off-by: Qiang Huang <h.huangqiang@huawei.com> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
8f96ff85ff
commit
c9797cfa27
@@ -45,6 +45,7 @@ enum {
|
||||
PB_FANOTIFY_MARK,
|
||||
PB_TTY,
|
||||
PB_TTY_INFO,
|
||||
PB_FILE_LOCK,
|
||||
PB_RLIMIT,
|
||||
PB_IDS,
|
||||
|
||||
|
@@ -49,6 +49,7 @@
|
||||
#include "protobuf/netdev.pb-c.h"
|
||||
#include "protobuf/tcp-stream.pb-c.h"
|
||||
#include "protobuf/tty.pb-c.h"
|
||||
#include "protobuf/file-lock.pb-c.h"
|
||||
#include "protobuf/rlimit.pb-c.h"
|
||||
|
||||
typedef size_t (*pb_getpksize_t)(void *obj);
|
||||
@@ -129,6 +130,7 @@ void cr_pb_init(void)
|
||||
CR_PB_DESC(PACKETSK, PacketSock, packet_sock);
|
||||
CR_PB_DESC(TTY, TtyFile, tty_file);
|
||||
CR_PB_DESC(TTY_INFO, TtyInfo, tty_info);
|
||||
CR_PB_DESC(FILE_LOCK, FileLock, file_lock);
|
||||
CR_PB_DESC(RLIMIT, Rlimit, rlimit);
|
||||
}
|
||||
|
||||
|
@@ -37,6 +37,7 @@ PROTO_FILES += vma.proto
|
||||
PROTO_FILES += core.proto
|
||||
PROTO_FILES += netdev.proto
|
||||
PROTO_FILES += tty.proto
|
||||
PROTO_FILES += file-lock.proto
|
||||
PROTO_FILES += rlimit.proto
|
||||
|
||||
PROTO_HDRS := $(patsubst %.proto,%.pb-c.h,$(PROTO_FILES))
|
||||
|
8
protobuf/file-lock.proto
Normal file
8
protobuf/file-lock.proto
Normal file
@@ -0,0 +1,8 @@
|
||||
message file_lock_entry {
|
||||
required uint32 flag = 1;
|
||||
required uint32 type = 2;
|
||||
required int32 pid = 3;
|
||||
required int32 fd = 4;
|
||||
required int64 start = 5;
|
||||
required int64 len = 6;
|
||||
}
|
Reference in New Issue
Block a user