[CRIU] [PATCH 2/8] parasite: fix error code in __parasite_daemon_wait_msg

Andrey Vagin avagin at openvz.org
Fri Jun 14 07:04:53 EDT 2013


A negative value must be resturned in error case

Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 pie/parasite.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pie/parasite.c b/pie/parasite.c
index 83d85e4..c54ee39 100644
--- a/pie/parasite.c
+++ b/pie/parasite.c
@@ -420,7 +420,7 @@ static int __parasite_daemon_wait_msg(struct ctl_msg *m)
 		if (ret != sizeof(*m)) {
 			pr_err("Trimmed message received (%d/%d)\n",
 			       (int)sizeof(*m), ret);
-			return 0;
+			return -1;
 		}
 
 		pr_debug("__fetched msg: %d %d %d\n",
-- 
1.8.2



More information about the CRIU mailing list