2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-22 09:58:09 +00:00

protobuf: autofs entry introduced

This entry will be used to carry all the autofs parameters, required to
restore mount point.

Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
Stanislav Kinsburskiy 2016-03-16 16:17:08 +03:00 committed by Pavel Emelyanov
parent c8911f2859
commit 4d31b38a0d
9 changed files with 25 additions and 0 deletions

View File

@ -78,6 +78,7 @@ struct cr_fd_desc_tmpl imgset_template[CR_FD_MAX] = {
FD_ENTRY_F(IP6TABLES, "ip6tables-%d", O_NOBUF),
FD_ENTRY_F(TMPFS_IMG, "tmpfs-%d.tar.gz", O_NOBUF),
FD_ENTRY_F(TMPFS_DEV, "tmpfs-dev-%d.tar.gz", O_NOBUF),
FD_ENTRY_F(AUTOFS, "autofs-%d", O_NOBUF),
FD_ENTRY(BINFMT_MISC, "binfmt-misc-%d"),
FD_ENTRY(TTY_FILES, "tty"),
FD_ENTRY(TTY_INFO, "tty-info"),

View File

@ -49,4 +49,8 @@
#define BINFMTFS_MAGIC 0x42494e4d
#endif
#ifndef AUTOFS_SUPER_MAGIC
#define AUTOFS_SUPER_MAGIC 0x0187
#endif
#endif /* __CR_FS_MAGIC_H__ */

View File

@ -105,6 +105,8 @@ enum {
CR_FD_FANOTIFY_MARK,
CR_FD_EVENTPOLL_TFD,
CR_FD_AUTOFS,
CR_FD_MAX
};

View File

@ -92,6 +92,7 @@
#define USERNS_MAGIC 0x55474906 /* Kazan */
#define SECCOMP_MAGIC 0x64413049 /* Kostomuksha */
#define BINFMT_MISC_MAGIC 0x67343323 /* Apatity */
#define AUTOFS_MAGIC 0x49353943 /* Sochi */
#define IFADDR_MAGIC RAW_IMAGE_MAGIC
#define ROUTE_MAGIC RAW_IMAGE_MAGIC

View File

@ -58,6 +58,7 @@ enum {
PB_NETNS,
PB_BINFMT_MISC, /* 50 */
PB_TTY_DATA,
PB_AUTOFS,
/* PB_AUTOGEN_STOP */

View File

@ -63,6 +63,7 @@
#include "images/userns.pb-c.h"
#include "images/seccomp.pb-c.h"
#include "images/binfmt-misc.pb-c.h"
#include "images/autofs.pb-c.h"
struct cr_pb_message_desc cr_pb_descs[PB_MAX];

View File

@ -59,6 +59,7 @@ proto-obj-y += seccomp.o
proto-obj-y += binfmt-misc.o
proto-obj-y += time.o
proto-obj-y += sysctl.o
proto-obj-y += autofs.o
CFLAGS += -iquote $(obj)/

13
images/autofs.proto Normal file
View File

@ -0,0 +1,13 @@
message autofs_entry {
required int32 fd = 1;
required int32 pgrp = 2;
required int32 timeout = 3;
required int32 minproto = 4;
required int32 maxproto = 5;
required int32 mode = 6;
optional int32 uid = 7;
optional int32 gid = 8;
optional int32 read_fd = 9;
}

View File

@ -453,6 +453,7 @@ handlers = {
'NETNS' : entry_handler(netns_entry),
'USERNS' : entry_handler(userns_entry),
'SECCOMP' : entry_handler(seccomp_entry),
'AUTOFS' : entry_handler(autofs_entry),
}
def __rhandler(f):