Skip to content
Snippets Groups Projects
Commit 01cf287a authored by shattered's avatar shattered
Browse files

If a drive is in database, it supports SMART by definition. Don't

require '-T permissive' in this case.


git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@2258 4ea69e1a-61f1-4043-bf83-b5c94c648137
parent 1f4120dc
No related branches found
No related tags found
No related merge requests found
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
#include "utility.h" #include "utility.h"
#include "knowndrives.h" #include "knowndrives.h"
const char *ataprint_c_cvsid="$Id: ataprint.cpp,v 1.167 2006/08/09 20:40:19 chrfranke Exp $" const char *ataprint_c_cvsid="$Id: ataprint.cpp,v 1.168 2006/09/17 09:34:29 shattered Exp $"
ATACMDNAMES_H_CVSID ATACMDS_H_CVSID ATAPRINT_H_CVSID CONFIG_H_CVSID EXTERN_H_CVSID INT64_H_CVSID KNOWNDRIVES_H_CVSID SMARTCTL_H_CVSID UTILITY_H_CVSID; ATACMDNAMES_H_CVSID ATACMDS_H_CVSID ATAPRINT_H_CVSID CONFIG_H_CVSID EXTERN_H_CVSID INT64_H_CVSID KNOWNDRIVES_H_CVSID SMARTCTL_H_CVSID UTILITY_H_CVSID;
// for passing global control variables // for passing global control variables
...@@ -502,7 +502,7 @@ uint64_t determine_capacity(struct ata_identify_device *drive, char *pstring){ ...@@ -502,7 +502,7 @@ uint64_t determine_capacity(struct ata_identify_device *drive, char *pstring){
return capacity_short; return capacity_short;
} }
void ataPrintDriveInfo (struct ata_identify_device *drive){ int ataPrintDriveInfo (struct ata_identify_device *drive){
int version, drivetype; int version, drivetype;
const char *description; const char *description;
char unknown[64], timedatetz[DATEANDEPOCHLEN]; char unknown[64], timedatetz[DATEANDEPOCHLEN];
...@@ -567,11 +567,11 @@ void ataPrintDriveInfo (struct ata_identify_device *drive){ ...@@ -567,11 +567,11 @@ void ataPrintDriveInfo (struct ata_identify_device *drive){
pout("\n==> WARNING: %s\n\n", knowndrives[drivetype].warningmsg); pout("\n==> WARNING: %s\n\n", knowndrives[drivetype].warningmsg);
if (version>=3) if (version>=3)
return; return drivetype;
pout("SMART is only available in ATA Version 3 Revision 3 or greater.\n"); pout("SMART is only available in ATA Version 3 Revision 3 or greater.\n");
pout("We will try to proceed in spite of this.\n"); pout("We will try to proceed in spite of this.\n");
return; return drivetype;
} }
...@@ -1408,7 +1408,7 @@ struct ata_smart_selftestlog smartselftest; ...@@ -1408,7 +1408,7 @@ struct ata_smart_selftestlog smartselftest;
int ataPrintMain (int fd){ int ataPrintMain (int fd){
int timewait,code; int timewait,code;
int returnval=0, retid=0, supported=0, needupdate=0; int returnval=0, retid=0, supported=0, needupdate=0, known=0;
const char * powername = 0; char powerchg = 0; const char * powername = 0; char powerchg = 0;
// If requested, check power mode first // If requested, check power mode first
...@@ -1467,7 +1467,7 @@ int ataPrintMain (int fd){ ...@@ -1467,7 +1467,7 @@ int ataPrintMain (int fd){
// Print most drive identity information if requested // Print most drive identity information if requested
if (con->driveinfo){ if (con->driveinfo){
pout("=== START OF INFORMATION SECTION ===\n"); pout("=== START OF INFORMATION SECTION ===\n");
ataPrintDriveInfo(&drive); known = ataPrintDriveInfo(&drive);
} }
// Was this a packet device? // Was this a packet device?
...@@ -1486,7 +1486,7 @@ int ataPrintMain (int fd){ ...@@ -1486,7 +1486,7 @@ int ataPrintMain (int fd){
} }
else { else {
pout("SMART support is: Ambiguous - ATA IDENTIFY DEVICE words 82-83 don't show if SMART supported.\n"); pout("SMART support is: Ambiguous - ATA IDENTIFY DEVICE words 82-83 don't show if SMART supported.\n");
failuretest(MANDATORY_CMD, returnval|=FAILSMART); if (!known) failuretest(MANDATORY_CMD, returnval|=FAILSMART);
pout(" Checking for SMART support by trying SMART ENABLE command.\n"); pout(" Checking for SMART support by trying SMART ENABLE command.\n");
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment