diff --git a/sm5/smartd.c b/sm5/smartd.c index 6680421c6028bd51dcc4d2b0e32e412cb3b10a2c..32f9f5100b1e73119425ffd8ff8c7020dd9128b7 100644 --- a/sm5/smartd.c +++ b/sm5/smartd.c @@ -39,7 +39,7 @@ // CVS ID strings extern const char *CVSid1, *CVSid2; -const char *CVSid3="$Id: smartd.c,v 1.34 2002/10/26 09:58:05 ballen4705 Exp $" +const char *CVSid3="$Id: smartd.c,v 1.35 2002/10/26 10:19:16 ballen4705 Exp $" CVSID1 CVSID4 CVSID7; // This function prints either to stdout or to the syslog as needed @@ -51,6 +51,7 @@ void printout(int priority,char *fmt, ...){ vprintf(fmt,ap); else vsyslog(priority,fmt,ap); + closelog(); va_end(ap); return; } diff --git a/sm5/smartd.cpp b/sm5/smartd.cpp index c9b16d763ce63dcf3b3fae989684a397ee4c0f90..34abbce270c7770fda8f645983561d96cfda3466 100644 --- a/sm5/smartd.cpp +++ b/sm5/smartd.cpp @@ -39,7 +39,7 @@ // CVS ID strings extern const char *CVSid1, *CVSid2; -const char *CVSid3="$Id: smartd.cpp,v 1.34 2002/10/26 09:58:05 ballen4705 Exp $" +const char *CVSid3="$Id: smartd.cpp,v 1.35 2002/10/26 10:19:16 ballen4705 Exp $" CVSID1 CVSID4 CVSID7; // This function prints either to stdout or to the syslog as needed @@ -51,6 +51,7 @@ void printout(int priority,char *fmt, ...){ vprintf(fmt,ap); else vsyslog(priority,fmt,ap); + closelog(); va_end(ap); return; } diff --git a/sm5/smartd.h b/sm5/smartd.h index 64e2239410cc10b022820b469cc05bf8735c3e5d..bf0fdd3f660b1b93cff2a0d21e07434ca03438d9 100644 --- a/sm5/smartd.h +++ b/sm5/smartd.h @@ -23,7 +23,7 @@ */ #ifndef CVSID7 -#define CVSID7 "$Id: smartd.h,v 1.10 2002/10/26 09:38:26 ballen4705 Exp $\n" +#define CVSID7 "$Id: smartd.h,v 1.11 2002/10/26 10:19:16 ballen4705 Exp $\n" #endif // Configuration file @@ -31,13 +31,15 @@ #define MAXLINELEN 114 #define MAXENTRIES 64 -// BAD PROGRAMMING PRACTICE - GLOBAL VARIABLES SHOULD BE IN .c NOT .h -// FILE +// BAD PROGRAMMING - GLOBAL VARIABLES SHOULD BE IN .c NOT .h FILE + /* how often SMART status is checked, in seconds */ int checktime = 1800; + // number of ATA and SCSI devices being watched int numatadevices; int numscsidevices; + #define MAXATADEVICES 12 #define MAXSCSIDEVICES 26