[CRIU] [PATCH 1/3] vzctl: pass vps_res in env_create_FN

Andrey Vagin avagin at openvz.org
Mon May 27 16:24:13 EDT 2013


Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 include/env.h      | 2 +-
 src/lib/hooks_ct.c | 4 ++--
 src/lib/hooks_vz.c | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/env.h b/include/env.h
index 7426d63..67ab3ef 100644
--- a/include/env.h
+++ b/include/env.h
@@ -34,7 +34,7 @@
 
 
 
-typedef int (*env_create_FN)(vps_handler *h, envid_t veid, const fs_param *fs,
+typedef int (*env_create_FN)(vps_handler *h, envid_t veid, const vps_res *res,
 			int wait_p, int old_wait_p, int err_p, void *data);
 
 /** Stop modes.
diff --git a/src/lib/hooks_ct.c b/src/lib/hooks_ct.c
index 33db380..d8909b1 100644
--- a/src/lib/hooks_ct.c
+++ b/src/lib/hooks_ct.c
@@ -512,7 +512,7 @@ int ct_env_create(struct arg_start *arg)
 
 	/* Return PID on success or -VZ_*_ERROR */
 	if (arg->fn)
-		ret = arg->fn(arg->h, arg->veid, &arg->res->fs,
+		ret = arg->fn(arg->h, arg->veid, arg->res,
 				arg->wait_p, arg->old_wait_p, arg->err_p, arg->data);
 	else
 		ret = ct_env_create_real(arg);
@@ -936,7 +936,7 @@ static int ct_restore_fn(vps_handler *h, envid_t veid, const fs_param *fs,
 	argv[0] = SCRIPTDIR "/vps-rst";
 	argv[1] = NULL;
 
-	snprintf(buf, sizeof(buf), "VE_ROOT=%s", fs->root);
+	snprintf(buf, sizeof(buf), "VE_ROOT=%s", res->fs.root);
 	env[0] = strdup(buf);
 	snprintf(buf, sizeof(buf), "VE_DUMP_DIR=%s", dumpfile);
 	env[1] = strdup(buf);
diff --git a/src/lib/hooks_vz.c b/src/lib/hooks_vz.c
index a6a1265..49ec042 100644
--- a/src/lib/hooks_vz.c
+++ b/src/lib/hooks_vz.c
@@ -260,7 +260,7 @@ static int vz_do_env_create(struct arg_start *arg)
 		if (fn == NULL) {
 			ret = _env_create(h, (void *)arg);
 		} else {
-			ret = fn(h, veid, &res->fs, wait_p, old_wait_p, err_p, data);
+			ret = fn(h, veid, res, wait_p, old_wait_p, err_p, data);
 		}
 env_err:
 		if (ret)
@@ -700,7 +700,7 @@ err:
 	return ret;
 }
 
-static int restore_fn(vps_handler *h, envid_t veid, const fs_param *fs,
+static int restore_fn(vps_handler *h, envid_t veid, const vps_res *res,
 			int wait_p, int old_wait_p, int err_p, void *data)
 {
 	int status, len, len1, ret;
-- 
1.8.2



More information about the CRIU mailing list