[CRIU] [PATCH] page-read: print errno in case of failure

Pavel Emelyanov xemul at parallels.com
Wed Aug 28 09:00:21 EDT 2013


On 08/20/2013 07:57 PM, Andrey Vagin wrote:
> (00.023059)   3898: Error (page-read.c:129): Can't read mapping page -1: Bad address
> 
> Signed-off-by: Andrey Vagin <avagin at openvz.org>
> ---
>  page-read.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/page-read.c b/page-read.c
> index 4e23e09..78b1303 100644
> --- a/page-read.c
> +++ b/page-read.c
> @@ -126,7 +126,7 @@ static int read_pagemap_page(struct page_read *pr, unsigned long vaddr, void *bu
>  				vaddr, pr->cvaddr, lseek(pr->fd_pg, 0, SEEK_CUR));
>  		ret = read(pr->fd_pg, buf, PAGE_SIZE);
>  		if (ret != PAGE_SIZE) {
> -			pr_err("Can't read mapping page %d\n", ret);
> +			pr_perror("Can't read mapping page %d", ret);
>  			return -1;
>  		}
>  	}
> 


applied


More information about the CRIU mailing list