From b56dd51aec0af83643e4a1370607719cec9b8d07 Mon Sep 17 00:00:00 2001
From: chrfranke <chrfranke@4ea69e1a-61f1-4043-bf83-b5c94c648137>
Date: Wed, 18 Jul 2007 21:18:09 +0000
Subject: [PATCH] Added ATA-8 revision 4, fixed WRITE LOG '-r ioctl' output.

git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@2413 4ea69e1a-61f1-4043-bf83-b5c94c648137
---
 sm5/CHANGELOG   |  4 +++-
 sm5/atacmds.cpp | 15 ++++++---------
 2 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/sm5/CHANGELOG b/sm5/CHANGELOG
index 4fe0acbc0..046385e69 100644
--- a/sm5/CHANGELOG
+++ b/sm5/CHANGELOG
@@ -1,6 +1,6 @@
 CHANGELOG for smartmontools
 
-$Id: CHANGELOG,v 1.620 2007/07/09 01:57:31 ballen4705 Exp $
+$Id: CHANGELOG,v 1.621 2007/07/18 21:18:09 chrfranke Exp $
 
 The most recent version of this file is:
 http://smartmontools.cvs.sourceforge.net/smartmontools/sm5/CHANGELOG?view=markup
@@ -33,6 +33,8 @@ NOTES FOR FUTURE RELEASES: see TODO file.
 
 <DEVELOPERS: ADDITIONS TO THE CHANGE LOG GO JUST BELOW HERE, PLEASE>
 
+  [CF] Added ATA-8 revision 4, fixed WRITE LOG '-r ioctl' output.
+
   [BA] Updated smartctl and smartd so that they can be used with the latest
        3ware controllers which have 24 ports.  Also updated docs.
        Thanks to Tim Bell at CERN.
diff --git a/sm5/atacmds.cpp b/sm5/atacmds.cpp
index d5ee98466..740fb4bbc 100644
--- a/sm5/atacmds.cpp
+++ b/sm5/atacmds.cpp
@@ -36,7 +36,7 @@
 #include "extern.h"
 #include "utility.h"
 
-const char *atacmds_c_cvsid="$Id: atacmds.cpp,v 1.184 2007/04/14 08:57:47 shattered Exp $"
+const char *atacmds_c_cvsid="$Id: atacmds.cpp,v 1.185 2007/07/18 21:18:09 chrfranke Exp $"
 ATACMDS_H_CVSID CONFIG_H_CVSID EXTERN_H_CVSID INT64_H_CVSID SCSIATA_H_CVSID UTILITY_H_CVSID;
 
 // to hold onto exit code for atexit routine
@@ -592,13 +592,9 @@ int smartcommandhandler(int device, smart_command_set command, int select, char
   }
 
 
-  // If reporting is enabled, say what input was sent to the command
-  if (con->reportataioctl && sendsdata){
-    pout("REPORT-IOCTL: DeviceFD=%d Command=%s", device, commandstrings[command]);
-    // if requested, pretty-print the output data structure
-    if (con->reportataioctl>1)
-      prettyprint((unsigned char *)data, commandstrings[command]);
-  }
+  // if requested, pretty-print the input data structure
+  if (con->reportataioctl>1 && sendsdata)
+    prettyprint((unsigned char *)data, commandstrings[command]);
 
   // In case the command produces an error, we'll want to know what it is:
   errno=0;
@@ -772,11 +768,12 @@ int ataVersionInfo (const char** description, struct ata_identify_device *drive,
     }
   }
 
-  // Try new ATA-8 minor revision numbers (Table 22 of T13/1699-D Revision 3f)
+  // Try new ATA-8 minor revision numbers (Table 30 of T13/1699-D Revision 4b)
   // (not in actual_ver/minor_str to avoid large sparse tables)
   const char *desc;
   switch (*minor) {
     case 0x0027: desc = "ATA-8-ACS revision 3c"; break;
+    case 0x0029: desc = "ATA-8-ACS revision 4"; break;
     case 0x0033: desc = "ATA-8-ACS revision 3e"; break;
     case 0x0042: desc = "ATA-8-ACS revision 3f"; break;
     case 0x0052: desc = "ATA-8-ACS revision 3b"; break;
-- 
GitLab