2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 14:25:49 +00:00

mount: Add PB entries for FS types

mnt_entry::fstype is a part of image ABI, thus we need
to provide some "common" encoding outside tools would
know about this field encoding.

Thus we instorduce fstype enum in .proto file and use it
in source code as well.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Cyrill Gorcunov
2013-03-18 22:32:57 +04:00
committed by Pavel Emelyanov
parent 2ce60f1dbc
commit 62d532a97f
2 changed files with 17 additions and 7 deletions

14
mount.c
View File

@@ -342,13 +342,13 @@ out:
}
static struct fstype fstypes[] = {
{ "unsupported" },
{ "proc" },
{ "sysfs" },
{ "devtmpfs" },
{ "binfmt_misc", binfmt_misc_dump },
{ "tmpfs", tmpfs_dump, tmpfs_restore },
{ "devpts" },
[FSTYPE__UNSUPPORTED] = { "unsupported" },
[FSTYPE__PROC] = { "proc" },
[FSTYPE__SYSFS] = { "sysfs" },
[FSTYPE__DEVTMPFS] = { "devtmpfs" },
[FSTYPE__BINFMT_MISC] = { "binfmt_misc", binfmt_misc_dump },
[FSTYPE__TMPFS] = { "tmpfs", tmpfs_dump, tmpfs_restore },
[FSTYPE__DEVPTS] = { "devpts" },
};
struct fstype *find_fstype_by_name(char *fst)

View File

@@ -1,3 +1,13 @@
enum fstype {
UNSUPPORTED = 0;
PROC = 1;
SYSFS = 2;
DEVTMPFS = 3;
BINFMT_MISC = 4;
TMPFS = 5;
DEVPTS = 6;
};
message mnt_entry {
required uint32 fstype = 1;
required uint32 mnt_id = 2;