mirror of
https://github.com/checkpoint-restore/criu
synced 2025-09-02 23:35:21 +00:00
mnt: Reshuffle MntEntries reading code
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
15
mount.c
15
mount.c
@@ -2493,17 +2493,19 @@ static int collect_mnt_from_image(struct mount_info **pms, struct ns_id *nsid)
|
|||||||
pm->need_plugin = me->with_plugin;
|
pm->need_plugin = me->with_plugin;
|
||||||
pm->deleted = me->deleted;
|
pm->deleted = me->deleted;
|
||||||
pm->is_ns_root = is_root(me->mountpoint);
|
pm->is_ns_root = is_root(me->mountpoint);
|
||||||
|
if (me->has_internal_sharing)
|
||||||
|
pm->internal_sharing = me->internal_sharing;
|
||||||
|
|
||||||
pr_debug("\t\tGetting source for %d\n", pm->mnt_id);
|
|
||||||
pm->source = xstrdup(me->source);
|
pm->source = xstrdup(me->source);
|
||||||
if (!pm->source)
|
if (!pm->source)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
if (me->has_internal_sharing)
|
pm->options = xstrdup(me->options);
|
||||||
pm->internal_sharing = me->internal_sharing;
|
if (!pm->options)
|
||||||
|
goto err;
|
||||||
|
|
||||||
/* FIXME: abort unsupported early */
|
/* FIXME: abort unsupported early */
|
||||||
pm->fstype = decode_fstype(me->fstype, me->fsname);
|
pm->fstype = decode_fstype(me->fstype, me->fsname);
|
||||||
|
|
||||||
if (get_mp_root(me, pm))
|
if (get_mp_root(me, pm))
|
||||||
goto err;
|
goto err;
|
||||||
@@ -2511,11 +2513,6 @@ static int collect_mnt_from_image(struct mount_info **pms, struct ns_id *nsid)
|
|||||||
if (get_mp_mountpoint(me, pm, root, root_len))
|
if (get_mp_mountpoint(me, pm, root, root_len))
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
pr_debug("\t\tGetting opts for %d\n", pm->mnt_id);
|
|
||||||
pm->options = xstrdup(me->options);
|
|
||||||
if (!pm->options)
|
|
||||||
goto err;
|
|
||||||
|
|
||||||
pr_debug("\tRead %d mp @ %s\n", pm->mnt_id, pm->mountpoint);
|
pr_debug("\tRead %d mp @ %s\n", pm->mnt_id, pm->mountpoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user