[CRIU] [PATCH 4/6] mnt: pass a mount point patch to get_mp_mountpoint
Andrei Vagin
avagin at openvz.org
Mon Sep 12 21:19:46 PDT 2016
From: Andrei Vagin <avagin at virtuozzo.com>
It will be used in next patches
Signed-off-by: Andrei Vagin <avagin at virtuozzo.com>
---
criu/mount.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/criu/mount.c b/criu/mount.c
index 78448c7..e568249 100644
--- a/criu/mount.c
+++ b/criu/mount.c
@@ -2934,11 +2934,11 @@ out:
return 0;
}
-static int get_mp_mountpoint(MntEntry *me, struct mount_info *mi, char *root, int root_len)
+static int get_mp_mountpoint(char *mountpoint, struct mount_info *mi, char *root, int root_len)
{
int len;
- len = strlen(me->mountpoint) + root_len + 1;
+ len = strlen(mountpoint) + root_len + 1;
mi->mountpoint = xmalloc(len);
if (!mi->mountpoint)
return -1;
@@ -2951,7 +2951,7 @@ static int get_mp_mountpoint(MntEntry *me, struct mount_info *mi, char *root, in
*/
strcpy(mi->mountpoint, root);
- strcpy(mi->mountpoint + root_len, me->mountpoint);
+ strcpy(mi->mountpoint + root_len, mountpoint);
mi->ns_mountpoint = mi->mountpoint + root_len;
@@ -3043,7 +3043,7 @@ static int collect_mnt_from_image(struct mount_info **pms, struct ns_id *nsid)
if (get_mp_root(me, pm))
goto err;
- if (get_mp_mountpoint(me, pm, root, root_len))
+ if (get_mp_mountpoint(me->mountpoint, pm, root, root_len))
goto err;
pr_debug("\tRead %d mp @ %s\n", pm->mnt_id, pm->mountpoint);
--
2.7.4
More information about the CRIU
mailing list