[CRIU] [PATCH 3/8] parasite: Use SET_PARASITE_STATUS_SUCCESS where appropriate

Cyrill Gorcunov gorcunov at openvz.org
Tue Feb 21 15:22:13 EST 2012


Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 parasite.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/parasite.c b/parasite.c
index d77a24a..544376f 100644
--- a/parasite.c
+++ b/parasite.c
@@ -106,6 +106,7 @@ static int dump_pages_init(parasite_status_t *st)
 	if (fd_pages[PG_SHARED] < 0)
 		goto err_s;
 
+	SET_PARASITE_STATUS_SUCCESS(st);
 	return 0;
 
 err_s:
@@ -229,8 +230,7 @@ static int dump_pages(struct parasite_dump_pages_args *args)
 		}
 	}
 
-	/* on success ret = 0 */
-	SET_PARASITE_STATUS(st, ret, ret);
+	SET_PARASITE_STATUS_SUCCESS(st);
 
 err_free:
 	if (map_brk)
@@ -245,6 +245,8 @@ static int dump_pages_fini(parasite_status_t *st)
 {
 	sys_close(fd_pages[PG_PRIV]);
 	sys_close(fd_pages[PG_SHARED]);
+
+	SET_PARASITE_STATUS_SUCCESS(st);
 	return 0;
 }
 
@@ -289,7 +291,7 @@ static int dump_sigact(parasite_status_t *st)
 	}
 
 	ret = 0;
-	SET_PARASITE_STATUS(st, 0, ret);
+	SET_PARASITE_STATUS_SUCCESS(st);
 
 err_close:
 	sys_close(fd);
@@ -321,6 +323,7 @@ static int dump_itimer(int which, int fd, parasite_status_t *st)
 		return st->ret;
 	}
 
+	SET_PARASITE_STATUS_SUCCESS(st);
 	return 0;
 }
 
@@ -351,7 +354,7 @@ static int dump_itimers(parasite_status_t *st)
 		goto err_close;
 
 	ret = 0;
-	SET_PARASITE_STATUS(st, 0, ret);
+	SET_PARASITE_STATUS_SUCCESS(st);
 
 err_close:
 	sys_close(fd);
@@ -369,7 +372,7 @@ static int dump_misc(struct parasite_dump_misc *args)
 	args->brk = sys_brk(0);
 	args->blocked = old_blocked;
 
-	SET_PARASITE_STATUS(st, 0, 0);
+	SET_PARASITE_STATUS_SUCCESS(st);
 	return 0;
 }
 
-- 
1.7.7.6



More information about the CRIU mailing list