multiple openlog invocations in clvmd.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
	syslog_init static variable defined in debuglog() of 
daemons/clvmd/clvmd.c is not used properly: the variable is
never updated.

Here is a fix.

Masatake YAMATO

Index: daemons/clvmd/clvmd.c
===================================================================
RCS file: /cvs/lvm2/LVM2/daemons/clvmd/clvmd.c,v
retrieving revision 1.47
diff -c -r1.47 clvmd.c
*** daemons/clvmd/clvmd.c	5 Jun 2008 14:24:28 -0000	1.47
--- daemons/clvmd/clvmd.c	12 Jun 2008 14:07:55 -0000
***************
*** 182,189 ****
  		va_end(ap);
  	}
  	if (debug == DEBUG_SYSLOG) {
! 		if (!syslog_init)
  			openlog("clvmd", LOG_PID, LOG_DAEMON);
  
  		va_start(ap,fmt);
  		vsyslog(LOG_DEBUG, fmt, ap);
--- 182,191 ----
  		va_end(ap);
  	}
  	if (debug == DEBUG_SYSLOG) {
! 		if (!syslog_init) {
  			openlog("clvmd", LOG_PID, LOG_DAEMON);
+ 			syslog_init = 1;
+ 		}
  
  		va_start(ap,fmt);
  		vsyslog(LOG_DEBUG, fmt, ap);

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux