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

Andrey Vagin avagin at openvz.org
Tue Aug 20 11:57:00 EDT 2013


(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;
 		}
 	}
-- 
1.8.3.1



More information about the CRIU mailing list