[CRIU] [PATCH] parasite: some cleanup
Kinsbursky Stanislav
skinsbursky at openvz.org
Tue Feb 21 09:21:42 EST 2012
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>
---
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