Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions src/libcrun/criu.c
Original file line number Diff line number Diff line change
Expand Up @@ -587,9 +587,10 @@ libcrun_container_checkpoint_linux_criu (libcrun_container_status_t *status, lib
const char *dest_in_root;

dest_in_root = chroot_realpath (rootfs, def->mounts[i]->destination, buf);
if (UNLIKELY (dest_in_root == NULL))
return crun_make_error (err, errno, "unable to resolve external bind mount `%s` under rootfs", def->mounts[i]->destination);
dest_in_root += strlen (rootfs);
if (LIKELY (dest_in_root != NULL))
dest_in_root += strlen (rootfs);
else
dest_in_root = def->mounts[i]->destination;

ret = libcriu_wrapper->criu_add_ext_mount (dest_in_root, dest_in_root);
if (UNLIKELY (ret < 0))
Expand Down Expand Up @@ -916,9 +917,10 @@ libcrun_container_restore_linux_criu (libcrun_container_status_t *status, libcru
const char *dest_in_root;

dest_in_root = chroot_realpath (rootfs, def->mounts[i]->destination, buf);
if (UNLIKELY (dest_in_root == NULL))
return crun_make_error (err, errno, "unable to resolve external bind mount `%s` under rootfs", def->mounts[i]->destination);
dest_in_root += strlen (rootfs);
if (LIKELY (dest_in_root != NULL))
dest_in_root += strlen (rootfs);
else
dest_in_root = def->mounts[i]->destination;

ret = libcriu_wrapper->criu_add_ext_mount (dest_in_root, def->mounts[i]->source);
if (UNLIKELY (ret < 0))
Expand Down