[CRIU] [PATCH v2 1/3] files: make convert_path_from_another_mp always return relative path
Andrew Vagin
avagin at virtuozzo.com
Thu Jan 25 03:35:07 MSK 2018
Applied, thanks
On Wed, Jan 17, 2018 at 10:56:07AM +0300, Pavel Tikhomirov wrote:
> If dmi->ns_mountpoint is "/" then in dst we will return "/..." -
> absolute path but we want here path relative to dmi mount. Adding "./"
> before the path guaranties that it will be always relative.
>
> https://jira.sw.ru/browse/PSBM-72351
> Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
> ---
> criu/files-reg.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/criu/files-reg.c b/criu/files-reg.c
> index 13719990a..9c83f2ce4 100644
> --- a/criu/files-reg.c
> +++ b/criu/files-reg.c
> @@ -1383,7 +1383,7 @@ static void convert_path_from_another_mp(char *src, char *dst, int dlen,
> * Absolute path to the mount point + difference between source
> * and destination roots + path relative to the mountpoint.
> */
> - snprintf(dst, dlen, "%s/%s/%s",
> + snprintf(dst, dlen, "./%s/%s/%s",
> dmi->ns_mountpoint + 1,
> smi->root + strlen(dmi->root),
> src + off);
> --
> 2.14.3
>
More information about the CRIU
mailing list