[CRIU] [PATCH] files-reg: Print file name on error

Cyrill Gorcunov gorcunov at openvz.org
Mon Mar 25 09:24:47 EDT 2013


In case if there some error happened better to
know which exactly file failed on open, for example

 | Error (files-reg.c:535): Can't open file /lib64/libgcc_s-4.4.7-20120601.so.1 on restore: No such file or directory

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 files-reg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/files-reg.c b/files-reg.c
index d59109e..2726b8e 100644
--- a/files-reg.c
+++ b/files-reg.c
@@ -532,7 +532,7 @@ static int do_open_reg(struct reg_file_info *rfi, void *arg)
 
 	fd = open(rfi->path, rfi->rfe->flags);
 	if (fd < 0) {
-		pr_perror("Can't open file on restore");
+		pr_perror("Can't open file %s on restore", rfi->path);
 		return fd;
 	}
 
-- 
1.8.1.4



More information about the CRIU mailing list