[uClibc-cvs] svn commit: trunk/uClibc/libc/misc/syslog

vapier at uclibc.org vapier at uclibc.org
Sat Apr 16 03:02:25 UTC 2005


Author: vapier
Date: 2005-04-15 21:02:25 -0600 (Fri, 15 Apr 2005)
New Revision: 10107

Log:
cbachman writes Bug 195:
Add back in the code which sets the default facility if none specified.  This 
may cause issues with klogd when it tries to use the libc's syslog(), but 
klogd comes with its own syslog() implementation so that's a none issue.  For 
more info, please see the following:
http://sources.redhat.com/ml/libc-alpha/2000-03/msg00059.html


Modified:
   trunk/uClibc/libc/misc/syslog/syslog.c


Changeset:
Modified: trunk/uClibc/libc/misc/syslog/syslog.c
===================================================================
--- trunk/uClibc/libc/misc/syslog/syslog.c	2005-04-16 02:28:55 UTC (rev 10106)
+++ trunk/uClibc/libc/misc/syslog/syslog.c	2005-04-16 03:02:25 UTC (rev 10107)
@@ -173,6 +173,10 @@
 	if (LogFile < 0 || !connected)
 		openlog(LogTag, LogStat | LOG_NDELAY, 0);
 
+	/* Set default facility if none specified. */
+	if ((pri & LOG_FACMASK) == 0)
+		pri |= LogFacility;
+
 	/* Build the message. We know the starting part of the message can take
 	 * no longer than 64 characters plus length of the LogTag. So it's
 	 * safe to test only LogTag and use normal sprintf everywhere else.




More information about the uClibc-cvs mailing list