[CRIU] [PATCH] restore: Unify exit() return code

Cyrill Gorcunov gorcunov at openvz.org
Wed Mar 27 06:16:09 EDT 2013


Some exit()'s are called with exit(-1), some
are with exit(1). Use exit(1) everywhere for
consistency.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 cr-restore.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/cr-restore.c b/cr-restore.c
index b253e87..835cce1 100644
--- a/cr-restore.c
+++ b/cr-restore.c
@@ -1080,10 +1080,10 @@ static int restore_task_with_children(void *_arg)
 	/* Restore root task */
 	if (current->parent == NULL) {
 		if (collect_mount_info())
-			exit(-1);
+			exit(1);
 
 		if (prepare_namespace(current->pid.virt, ca->clone_flags))
-			exit(-1);
+			exit(1);
 
 		/*
 		 * We need non /proc proc mount for restoring pid and mount
@@ -1091,10 +1091,10 @@ static int restore_task_with_children(void *_arg)
 		 * Thus -- mount proc at custom location for any new namespace
 		 */
 		if (mount_proc())
-			exit(-1);
+			exit(1);
 
 		if (root_prepare_shared())
-			exit(-1);
+			exit(1);
 	}
 
 	/*
-- 
1.8.1.4



More information about the CRIU mailing list