[Devel] [PATCH 03/12][user-cr] Add app_restart_args->debug

Sukadev Bhattiprolu sukadev at linux.vnet.ibm.com
Fri Mar 5 14:37:23 PST 2010


From: Sukadev Bhattiprolu <sukadev at linux.vnet.ibm.com>
Date: Thu, 4 Mar 2010 17:46:31 -0800
Subject: [PATCH 03/12][user-cr] Add app_restart_args->debug

Make 'debug' a field in struct app_restart_args so other callers of
app_restart() can also control the debug output of app_restart().

Signed-off-by: Sukadev Bhattiprolu <sukadev at linux.vnet.ibm.com>
---
 restart.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/restart.c b/restart.c
index 314390c..87fff1e 100644
--- a/restart.c
+++ b/restart.c
@@ -387,6 +387,7 @@ struct app_restart_args {
 	int infd;
 	int klogfd;
 	long warn;
+	int debug;
 	long fail;
 	int keep_lsm;
 };
@@ -583,7 +584,7 @@ static void parse_args(struct app_restart_args *args, int argc, char *argv[])
 			args->copy_status = 1;
 			break;
 		case 'd':
-			global_debug = 1;
+			global_debug = args->debug = 1;
 			break;
 		case 'F':
 			args->freezer = optarg;
@@ -818,6 +819,7 @@ int app_restart(struct app_restart_args *args)
 	ctx.args = args;
 
 	global_send_sigint = args->send_sigint;
+	global_debug = args->debug;
 
 	/* input file descriptor (default: stdin) */
 	if (args->infd >= 0) {
-- 
1.6.0.4

_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list