From a3e8ce6f88d67d88e4ad7f4f07574667a311d699 Mon Sep 17 00:00:00 2001
From: dpgilbert <dpgilbert@4ea69e1a-61f1-4043-bf83-b5c94c648137>
Date: Fri, 10 Nov 2006 04:43:57 +0000
Subject: [PATCH] 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
---
 sm5/smartd.cpp | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/sm5/smartd.cpp b/sm5/smartd.cpp
index b18dcbf2e..1ecaed43d 100644
--- a/sm5/smartd.cpp
+++ b/sm5/smartd.cpp
@@ -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, 
                   *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
 extern const char *os_solaris_ata_s_cvsid;
 #endif
 #ifdef _WIN32
 extern const char *daemon_win32_c_cvsid, *hostname_win32_c_cvsid, *syslog_win32_c_cvsid;
 #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
 #ifdef DAEMON_WIN32_H_CVSID
 DAEMON_WIN32_H_CVSID
@@ -2581,7 +2581,8 @@ int SCSICheckDevice(cfgfile *cfg)
       // Lack of PrintOut() here is intentional!
       MailWarning(cfg, 9, "Device: %s, unable to open device", name);
       return 1;
-    }
+    } else if (debugmode)
+        PrintOut(LOG_INFO,"Device: %s, opened SCSI device\n", name);
     currenttemp = 0;
     asc = 0;
     ascq = 0;
@@ -2599,10 +2600,11 @@ int SCSICheckDevice(cfgfile *cfg)
         if (cp) {
             PrintOut(LOG_CRIT, "Device: %s, SMART Failure: %s\n", name, cp);
             MailWarning(cfg, 1,"Device: %s, SMART Failure: %s", name, cp); 
-        }
+        } if (debugmode)
+            PrintOut(LOG_INFO,"Device: %s, non-SMART asc,ascq: %d,%d\n",
+                     name, (int)asc, (int)ascq);  
     } else if (debugmode)
-        PrintOut(LOG_INFO,"Device: %s, Acceptable asc,ascq: %d,%d\n", 
-                 name, (int)asc, (int)ascq);  
+        PrintOut(LOG_INFO,"Device: %s, SMART health: passed\n", name);  
 
     // check temperature limits
     if (cfg->tempdiff || cfg->tempinfo || cfg->tempcrit)
-- 
GitLab