iscsi-initiator-utils/iscsi-initiator-utils-log-info.patch

24 lines
764 B
Diff
Raw Normal View History

2010-05-19 10:38:36 +00:00
diff -aurp open-iscsi-2.0-872-rc1-bnx2i/usr/log.c open-iscsi-2.0-872-rc1-bnx2i.work/usr/log.c
--- open-iscsi-2.0-872-rc1-bnx2i/usr/log.c 2010-05-06 15:26:01.000000000 -0500
+++ open-iscsi-2.0-872-rc1-bnx2i.work/usr/log.c 2010-05-06 15:51:47.000000000 -0500
@@ -281,10 +281,15 @@ void log_do_log_daemon(int prio, void *p
void log_do_log_stderr(int prio, void *priv, const char *fmt, va_list ap)
{
- fprintf(stderr, "%s: ", log_name);
- vfprintf(stderr, fmt, ap);
- fprintf(stderr, "\n");
- fflush(stderr);
+ if (prio == LOG_INFO) {
+ vfprintf(stdout, fmt, ap);
+ fprintf(stdout, "\n");
+ } else {
+ fprintf(stderr, "%s: ", log_name);
+ vfprintf(stderr, fmt, ap);
+ fprintf(stderr, "\n");
+ fflush(stderr);
+ }
}
void log_warning(const char *fmt, ...)