Skip to content
Snippets Groups Projects
Commit a3e8ce6f authored by dpgilbert's avatar dpgilbert
Browse files

make debugmode for SCSI disks produce clearer log entries

git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@2321 4ea69e1a-61f1-4043-bf83-b5c94c648137
parent b0aa12d0
No related branches found
No related tags found
No related merge requests found
...@@ -118,14 +118,14 @@ extern "C" int getdomainname(char *, int); // no declaration in header files! ...@@ -118,14 +118,14 @@ extern "C" int getdomainname(char *, int); // no declaration in header files!
extern const char *atacmdnames_c_cvsid, *atacmds_c_cvsid, *ataprint_c_cvsid, *escalade_c_cvsid, extern const char *atacmdnames_c_cvsid, *atacmds_c_cvsid, *ataprint_c_cvsid, *escalade_c_cvsid,
*knowndrives_c_cvsid, *os_XXXX_c_cvsid, *scsicmds_c_cvsid, *utility_c_cvsid; *knowndrives_c_cvsid, *os_XXXX_c_cvsid, *scsicmds_c_cvsid, *utility_c_cvsid;
static const char *filenameandversion="$Id: smartd.cpp,v 1.381 2006/10/25 20:01:44 ballen4705 Exp $"; static const char *filenameandversion="$Id: smartd.cpp,v 1.382 2006/11/10 04:43:57 dpgilbert Exp $";
#ifdef NEED_SOLARIS_ATA_CODE #ifdef NEED_SOLARIS_ATA_CODE
extern const char *os_solaris_ata_s_cvsid; extern const char *os_solaris_ata_s_cvsid;
#endif #endif
#ifdef _WIN32 #ifdef _WIN32
extern const char *daemon_win32_c_cvsid, *hostname_win32_c_cvsid, *syslog_win32_c_cvsid; extern const char *daemon_win32_c_cvsid, *hostname_win32_c_cvsid, *syslog_win32_c_cvsid;
#endif #endif
const char *smartd_c_cvsid="$Id: smartd.cpp,v 1.381 2006/10/25 20:01:44 ballen4705 Exp $" const char *smartd_c_cvsid="$Id: smartd.cpp,v 1.382 2006/11/10 04:43:57 dpgilbert Exp $"
ATACMDS_H_CVSID ATAPRINT_H_CVSID CONFIG_H_CVSID ATACMDS_H_CVSID ATAPRINT_H_CVSID CONFIG_H_CVSID
#ifdef DAEMON_WIN32_H_CVSID #ifdef DAEMON_WIN32_H_CVSID
DAEMON_WIN32_H_CVSID DAEMON_WIN32_H_CVSID
...@@ -2581,7 +2581,8 @@ int SCSICheckDevice(cfgfile *cfg) ...@@ -2581,7 +2581,8 @@ int SCSICheckDevice(cfgfile *cfg)
// Lack of PrintOut() here is intentional! // Lack of PrintOut() here is intentional!
MailWarning(cfg, 9, "Device: %s, unable to open device", name); MailWarning(cfg, 9, "Device: %s, unable to open device", name);
return 1; return 1;
} } else if (debugmode)
PrintOut(LOG_INFO,"Device: %s, opened SCSI device\n", name);
currenttemp = 0; currenttemp = 0;
asc = 0; asc = 0;
ascq = 0; ascq = 0;
...@@ -2599,10 +2600,11 @@ int SCSICheckDevice(cfgfile *cfg) ...@@ -2599,10 +2600,11 @@ int SCSICheckDevice(cfgfile *cfg)
if (cp) { if (cp) {
PrintOut(LOG_CRIT, "Device: %s, SMART Failure: %s\n", name, cp); PrintOut(LOG_CRIT, "Device: %s, SMART Failure: %s\n", name, cp);
MailWarning(cfg, 1,"Device: %s, SMART Failure: %s", name, cp); MailWarning(cfg, 1,"Device: %s, SMART Failure: %s", name, cp);
} } if (debugmode)
} else if (debugmode) PrintOut(LOG_INFO,"Device: %s, non-SMART asc,ascq: %d,%d\n",
PrintOut(LOG_INFO,"Device: %s, Acceptable asc,ascq: %d,%d\n",
name, (int)asc, (int)ascq); name, (int)asc, (int)ascq);
} else if (debugmode)
PrintOut(LOG_INFO,"Device: %s, SMART health: passed\n", name);
// check temperature limits // check temperature limits
if (cfg->tempdiff || cfg->tempinfo || cfg->tempcrit) if (cfg->tempdiff || cfg->tempinfo || cfg->tempcrit)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment