[uClibc-cvs] uClibc/libc/misc/syslog syslog.c,1.12,1.13

Erik Andersen andersen at uclibc.org
Tue Apr 6 12:19:25 UTC 2004


Update of /var/cvs/uClibc/libc/misc/syslog
In directory nail:/tmp/cvs-serv15325/libc/misc/syslog

Modified Files:
	syslog.c 
Log Message:
Fix a bug noticed by Oleg I. Vdovikin, oleg at cs dot msu dot su.
This code in uClibc would attempt to set the default facility if
none was specified.  Except none being specified is 0, which is
also LOG_KERN, therefore klogd could never get kernel messages
logged as LOG_KERN.


Index: syslog.c
===================================================================
RCS file: /var/cvs/uClibc/libc/misc/syslog/syslog.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- a/syslog.c	27 Dec 2003 23:30:33 -0000	1.12
+++ b/syslog.c	6 Apr 2004 12:19:22 -0000	1.13
@@ -173,10 +173,6 @@
 	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