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

mnt: Preparations for mountpoints dumping

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Pavel Emelyanov
2012-05-12 03:30:10 +04:00
parent 3d64f9d140
commit db297a0f97
7 changed files with 33 additions and 0 deletions

View File

@@ -5,6 +5,7 @@
#include "syscall.h"
#include "uts_ns.h"
#include "ipc_ns.h"
#include "mount.h"
int switch_ns(int pid, int type, char *ns)
{
@@ -49,6 +50,12 @@ static int do_dump_namespaces(int ns_pid, unsigned int ns_flags)
if (ret < 0)
goto err;
}
if (ns_flags & CLONE_NEWNS) {
pr_info("Dump MNT namespace (mountpoints)\n");
ret = dump_mnt_ns(ns_pid, fdset);
if (ret < 0)
goto err;
}
err:
close_cr_fdset(&fdset);
return ret;