[CRIU] [PATCH] mount: Add a detailed error message when opts.root is NULL
Kondo, Uchio
udzura at udzura.jp
Tue Sep 4 06:05:53 MSK 2018
Signed-off-by: Uchio KONDO <udzura at udzura.jp>
---
criu/mount.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/criu/mount.c b/criu/mount.c
index d95e6033..c7c06ea2 100644
--- a/criu/mount.c
+++ b/criu/mount.c
@@ -2476,6 +2476,11 @@ static int do_mount_one(struct mount_info *mi)
pr_debug("\tMounting %s @%s (%d)\n", mi->fstype->name,
mi->mountpoint, mi->need_plugin);
if (rst_mnt_is_root(mi)) {
+ if (opts.root == NULL) {
+ pr_err("Option --root is required to restore
processes with pivot_root\n");
+ return -1;
+ }
+
/* do_mount_root() is called from populate_mnt_ns() */
if (mount(opts.root, mi->mountpoint, NULL, MS_BIND |
MS_REC, NULL))
return -1;
--
2.17.0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20180904/a672c5be/attachment.html>
More information about the CRIU
mailing list