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

[linux-lvm] multiple openlog invocations in clvmd.c



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);


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