Skip to content
Snippets Groups Projects
Commit 2b48e428 authored by manfred99's avatar manfred99
Browse files

atacmds.cpp: clip raw value of Power_On_Hours to 4 bytes

git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@2742 4ea69e1a-61f1-4043-bf83-b5c94c648137
parent 393c5b44
No related branches found
No related tags found
No related merge requests found
CHANGELOG for smartmontools CHANGELOG for smartmontools
$Id: CHANGELOG,v 1.775 2009/02/27 22:42:51 chrfranke Exp $ $Id: CHANGELOG,v 1.776 2009/03/01 20:28:43 manfred99 Exp $
The most recent version of this file is: The most recent version of this file is:
http://smartmontools.cvs.sourceforge.net/smartmontools/sm5/CHANGELOG?view=markup http://smartmontools.cvs.sourceforge.net/smartmontools/sm5/CHANGELOG?view=markup
...@@ -41,6 +41,11 @@ NOTES FOR FUTURE RELEASES: see TODO file. ...@@ -41,6 +41,11 @@ NOTES FOR FUTURE RELEASES: see TODO file.
<DEVELOPERS: ADDITIONS TO THE CHANGE LOG GO JUST BELOW HERE, PLEASE> <DEVELOPERS: ADDITIONS TO THE CHANGE LOG GO JUST BELOW HERE, PLEASE>
[MS] Workaround for huge raw values of attribute 9, needed
for Hitachi Travelstar C4K60. For the Power_On_Minutes case,
clip the display to 4 bytes and show the remaining part,
if existent, in parens.
[CF] Add experimental option '-d usbjmicron[,PORT]' for drives [CF] Add experimental option '-d usbjmicron[,PORT]' for drives
behind JMicron USB bridges. Tested on WinXP with JM20336 in behind JMicron USB bridges. Tested on WinXP with JM20336 in
AixCase AIX-ESU35CD. Many thanks to JMicron tech support AixCase AIX-ESU35CD. Many thanks to JMicron tech support
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
#include <algorithm> // std::sort #include <algorithm> // std::sort
const char *atacmds_c_cvsid="$Id: atacmds.cpp,v 1.213 2009/02/28 18:26:35 chrfranke Exp $" const char *atacmds_c_cvsid="$Id: atacmds.cpp,v 1.214 2009/03/01 20:28:44 manfred99 Exp $"
ATACMDS_H_CVSID CONFIG_H_CVSID EXTERN_H_CVSID INT64_H_CVSID SCSIATA_H_CVSID UTILITY_H_CVSID; ATACMDS_H_CVSID CONFIG_H_CVSID EXTERN_H_CVSID INT64_H_CVSID SCSIATA_H_CVSID UTILITY_H_CVSID;
// for passing global control variables // for passing global control variables
...@@ -1905,9 +1905,12 @@ int64_t ataPrintSmartAttribRawValue(char *out, ...@@ -1905,9 +1905,12 @@ int64_t ataPrintSmartAttribRawValue(char *out,
case 9: case 9:
if (select==1){ if (select==1){
// minutes // minutes
int64_t tmp1=rawvalue/60; int64_t temp=word[0]+(word[1]<<16);
int64_t tmp2=rawvalue%60; int64_t tmp1=temp/60;
int64_t tmp2=temp%60;
out+=sprintf(out, "%"PRIu64"h+%02"PRIu64"m", tmp1, tmp2); out+=sprintf(out, "%"PRIu64"h+%02"PRIu64"m", tmp1, tmp2);
if (word[2])
out+=sprintf(out, " (%u)", word[2]);
} }
else if (select==3){ else if (select==3){
// seconds // seconds
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment