[Open-FCoE] [PATCH 04/13] fcoe-utils: fcoemon passes the "--debug" flag to fcoeplumb

Robert Love robert.w.love at intel.com
Thu Jul 2 16:28:08 UTC 2009


From: Rob Love <robert.w.love at intel.com>

This patch makes it so the "--debug" option is passed to
fcoeplumb when fcoemon is in debug mode. Since the fcoeplumb
script does not read "DEBUG" from the config file anymore it
needs to be passed by fcoemon.

Signed-off-by: Robert Love <robert.w.love at intel.com>
---

 fcoemon.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/fcoemon.c b/fcoemon.c
index 656482f..66aa373 100644
--- a/fcoemon.c
+++ b/fcoemon.c
@@ -1774,7 +1774,7 @@ ignore_event:
 static void
 fcm_dcbd_setup(struct fcm_fcoe *ff, enum fcoeadm_action action)
 {
-	char *op;
+	char *op, *debug = NULL;
 	char *qos_arg;
 	char qos[64];
 	u_int32_t mask;
@@ -1825,7 +1825,10 @@ fcm_dcbd_setup(struct fcm_fcoe *ff, enum fcoeadm_action action)
 				qos_arg = "--qos";
 			}
 		}
+
 		if (fcm_debug) {
+			debug = "--debug";
+
 			if (!action)
 				SA_LOG("%s %s %s\n",
 				       fcm_dcbd_cmd, ff->ff_name, op);
@@ -1834,8 +1837,10 @@ fcm_dcbd_setup(struct fcm_fcoe *ff, enum fcoeadm_action action)
 				       fcm_dcbd_cmd, ff->ff_name, op,
 				       qos_arg, qos);
 		}
+
 		execlp(fcm_dcbd_cmd, fcm_dcbd_cmd, ff->ff_name,
-		       op, qos_arg, qos, (char *)NULL);
+		       op, qos_arg, qos, debug, (char *)NULL);
+
 		SA_LOG_ERR(errno, "exec '%s' failed", fcm_dcbd_cmd);
 		exit(1);
 	}




More information about the devel mailing list