9ed3fb
diff -aurp open-iscsi-2.0-872-rc1-bnx2i/usr/log.c open-iscsi-2.0-872-rc1-bnx2i.work/usr/log.c
9ed3fb
--- open-iscsi-2.0-872-rc1-bnx2i/usr/log.c	2010-05-06 15:26:01.000000000 -0500
9ed3fb
+++ open-iscsi-2.0-872-rc1-bnx2i.work/usr/log.c	2010-05-06 15:51:47.000000000 -0500
9ed3fb
@@ -281,10 +281,15 @@ void log_do_log_daemon(int prio, void *p
9ed3fb
 
9ed3fb
 void log_do_log_stderr(int prio, void *priv, const char *fmt, va_list ap)
9ed3fb
 {
9ed3fb
-	fprintf(stderr, "%s: ", log_name);
9ed3fb
-	vfprintf(stderr, fmt, ap);
9ed3fb
-	fprintf(stderr, "\n");
9ed3fb
-	fflush(stderr);
9ed3fb
+	if (prio == LOG_INFO) {
9ed3fb
+		vfprintf(stdout, fmt, ap);
9ed3fb
+		fprintf(stdout, "\n");
9ed3fb
+	} else {
9ed3fb
+		fprintf(stderr, "%s: ", log_name);
9ed3fb
+		vfprintf(stderr, fmt, ap);
9ed3fb
+		fprintf(stderr, "\n");
9ed3fb
+		fflush(stderr);
9ed3fb
+	}
9ed3fb
 }
9ed3fb
 
9ed3fb
 void log_warning(const char *fmt, ...)
9ed3fb
@@ -313,6 +318,14 @@ void log_debug(int level, const char *fm
9ed3fb
 	}
9ed3fb
 }
9ed3fb
 
9ed3fb
+void log_info(const char *fmt, ...)
9ed3fb
+{
9ed3fb
+	va_list ap;
9ed3fb
+	va_start(ap, fmt);
9ed3fb
+	log_func(LOG_INFO, log_func_priv, fmt, ap);
9ed3fb
+	va_end(ap);
9ed3fb
+}
9ed3fb
+
9ed3fb
 static void __dump_line(int level, unsigned char *buf, int *cp)
9ed3fb
 {
9ed3fb
 	char line[16*3+5], *lp = line;
9ed3fb
diff -aurp open-iscsi-2.0-872-rc1-bnx2i/usr/log.h open-iscsi-2.0-872-rc1-bnx2i.work/usr/log.h
9ed3fb
--- open-iscsi-2.0-872-rc1-bnx2i/usr/log.h	2010-05-06 15:26:01.000000000 -0500
9ed3fb
+++ open-iscsi-2.0-872-rc1-bnx2i.work/usr/log.h	2010-05-06 15:39:58.000000000 -0500
9ed3fb
@@ -71,6 +71,8 @@ extern int log_init(char *program_name, 
9ed3fb
 	void *priv);
9ed3fb
 extern void log_close (pid_t pid);
9ed3fb
 extern void dump_logmsg (void *);
9ed3fb
+extern void log_info(const char *fmt, ...)
9ed3fb
+	__attribute__ ((format (printf, 1, 2)));
9ed3fb
 extern void log_warning(const char *fmt, ...)
9ed3fb
 	__attribute__ ((format (printf, 1, 2)));
9ed3fb
 extern void log_error(const char *fmt, ...)
9ed3fb
diff -aurp open-iscsi-2.0-872-rc1-bnx2i/usr/session_mgmt.c open-iscsi-2.0-872-rc1-bnx2i.work/usr/session_mgmt.c
9ed3fb
--- open-iscsi-2.0-872-rc1-bnx2i/usr/session_mgmt.c	2010-05-06 15:26:01.000000000 -0500
9ed3fb
+++ open-iscsi-2.0-872-rc1-bnx2i.work/usr/session_mgmt.c	2010-05-06 15:43:28.000000000 -0500
9ed3fb
@@ -42,10 +42,10 @@ static void log_login_msg(struct node_re
9ed3fb
 			  rec->conn[0].port);
9ed3fb
 		iscsid_handle_error(rc);
9ed3fb
 	} else
9ed3fb
-		log_warning("Login to [iface: %s, target: %s, portal: "
9ed3fb
-			    "%s,%d] successful.", rec->iface.name,
9ed3fb
-			    rec->name, rec->conn[0].address,
9ed3fb
-			    rec->conn[0].port);
9ed3fb
+		log_info("Login to [iface: %s, target: %s, portal: "
9ed3fb
+			 "%s,%d] successful.", rec->iface.name,
9ed3fb
+			 rec->name, rec->conn[0].address,
9ed3fb
+			 rec->conn[0].port);
9ed3fb
 }
9ed3fb
 
9ed3fb
 struct iscsid_async_req {
9ed3fb
@@ -100,15 +100,15 @@ int iscsi_login_portal(void *data, struc
9ed3fb
 	struct iscsid_async_req *async_req = NULL;
9ed3fb
 	int rc = 0, fd;
9ed3fb
 
9ed3fb
-	log_warning("Logging in to [iface: %s, target: %s, portal: %s,%d]",
9ed3fb
-		    rec->iface.name, rec->name, rec->conn[0].address,
9ed3fb
-		    rec->conn[0].port);
9ed3fb
+	log_info("Logging in to [iface: %s, target: %s, portal: %s,%d]",
9ed3fb
+		 rec->iface.name, rec->name, rec->conn[0].address,
9ed3fb
+		 rec->conn[0].port);
9ed3fb
 
9ed3fb
 	if (list) {
9ed3fb
 		async_req = calloc(1, sizeof(*async_req));
9ed3fb
 		if (!async_req)
9ed3fb
-			log_error("Could not allocate memory for async login "
9ed3fb
-				  "handling. Using sequential login instead.");
9ed3fb
+			log_info("Could not allocate memory for async login "
9ed3fb
+				 "handling. Using sequential login instead.");
9ed3fb
 		else
9ed3fb
 			INIT_LIST_HEAD(&async_req->list);
9ed3fb
 	}
9ed3fb
@@ -215,10 +215,10 @@ static void log_logout_msg(struct sessio
9ed3fb
 			  info->persistent_address, info->port);
9ed3fb
 		iscsid_handle_error(rc);
9ed3fb
 	} else
9ed3fb
-		log_warning("Logout of [sid: %d, target: %s, "
9ed3fb
-			    "portal: %s,%d] successful.",
9ed3fb
-			    info->sid, info->targetname,
9ed3fb
-			    info->persistent_address, info->port);
9ed3fb
+		log_info("Logout of [sid: %d, target: %s, "
9ed3fb
+			 "portal: %s,%d] successful.",
9ed3fb
+			 info->sid, info->targetname,
9ed3fb
+			 info->persistent_address, info->port);
9ed3fb
 }
9ed3fb
 
9ed3fb
 static int iscsid_logout_reqs_wait(struct list_head *list)
9ed3fb
@@ -252,16 +252,16 @@ int iscsi_logout_portal(struct session_i
9ed3fb
 	int fd, rc;
9ed3fb
 
9ed3fb
 	/* TODO: add fn to add session prefix info like dev_printk */
9ed3fb
-	log_warning("Logging out of session [sid: %d, target: %s, portal: "
9ed3fb
-		    "%s,%d]",
9ed3fb
-		    info->sid, info->targetname, info->persistent_address,
9ed3fb
-		    info->port);
9ed3fb
+	log_info("Logging out of session [sid: %d, target: %s, portal: "
9ed3fb
+		 "%s,%d]",
9ed3fb
+		 info->sid, info->targetname, info->persistent_address,
9ed3fb
+		 info->port);
9ed3fb
 
9ed3fb
 	if (list) {
9ed3fb
 		async_req = calloc(1, sizeof(*async_req));
9ed3fb
 		if (!async_req)
9ed3fb
-			log_error("Could not allocate memory for async logout "
9ed3fb
-				  "handling. Using sequential logout instead.");
9ed3fb
+			log_info("Could not allocate memory for async logout "
9ed3fb
+				 "handling. Using sequential logout instead.");
9ed3fb
 	}
9ed3fb
 
9ed3fb
 	if (!async_req)