[CRIU] [crtools-bot for Kinsbursky Stanislav ] ipc: add error print in case of image read failure during variables restore

Cyrill Gorcunov gorcunov at openvz.org
Fri Feb 10 07:02:03 EST 2012


The commit is pushed to "master" and will appear on git://github.com/cyrillos/crtools.git
------>
commit 01198ad7dfcf363f6d9d2530c13fcb35a5c7c90f
Author: Kinsbursky Stanislav <skinsbursky at openvz.org>
Date:   Fri Feb 10 13:42:50 2012 +0300

    ipc: add error print in case of image read failure during variables restore
    
    Signed-off-by: Stanislav Kinsbursky <skinsbursky at parallels.com>
    Acked-by: Pavel Emelyanov <xemul at parallels.com>
    Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 ipc_ns.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/ipc_ns.c b/ipc_ns.c
index 686c225..e9322d0 100644
--- a/ipc_ns.c
+++ b/ipc_ns.c
@@ -401,8 +401,10 @@ static int prepare_ipc_var(int pid)
 		return -1;
 
 	ret = read_img(fd, &var);
-	if (ret <= 0)
+	if (ret <= 0) {
+		pr_err("Failed to read IPC namespace variables\n");
 		return -EFAULT;
+	}
 
 	show_var_entry(&var);
 


More information about the CRIU mailing list