[CRIU] [crtools-bot for Kinsbursky Stanislav ] parasite: some cleanup

Cyrill Gorcunov gorcunov at openvz.org
Tue Feb 21 11:34:21 EST 2012


The commit is pushed to "master" and will appear on git://github.com/cyrillos/crtools.git
------>
commit 385d7e0369f171d1eb70c1e75577930855963349
Author: Kinsbursky Stanislav <skinsbursky at openvz.org>
Date:   Tue Feb 21 17:21:42 2012 +0300

    parasite: some cleanup
    
    1) Added few missed successfull status setup - this looks
       redundant though, but unified with other functions.
    2) remove redundant argument in dump_pages_fini().
    
    Signed-off-by: Stanislav Kinsbursky <skinsbursky at openvz.org>
    Acked-by: Pavel Emelyanov <xemul at parallels.com>
    Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 parasite.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/parasite.c b/parasite.c
index d77a24a..00ecff5 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(st, 0, 0);
 	return 0;
 
 err_s:
@@ -241,7 +242,7 @@ err:
 	return ret;
 }
 
-static int dump_pages_fini(parasite_status_t *st)
+static int dump_pages_fini(void)
 {
 	sys_close(fd_pages[PG_PRIV]);
 	sys_close(fd_pages[PG_SHARED]);
@@ -395,6 +396,7 @@ static int init(struct parasite_init_args *args)
 	else
 		reset_blocked = 1;
 
+	SET_PARASITE_STATUS(&args->status, ret, ret);
 	return ret;
 }
 
@@ -433,7 +435,7 @@ static int __used parasite_service(unsigned long cmd, void *args, void *brk)
 	case PARASITE_CMD_DUMPPAGES_INIT:
 		return dump_pages_init((parasite_status_t *) args);
 	case PARASITE_CMD_DUMPPAGES_FINI:
-		return dump_pages_fini((parasite_status_t *) args);
+		return dump_pages_fini();
 	case PARASITE_CMD_DUMPPAGES:
 		return dump_pages((struct parasite_dump_pages_args *)args);
 	case PARASITE_CMD_DUMP_SIGACTS:


More information about the CRIU mailing list