Skip to content
Snippets Groups Projects
Commit 90aca90b authored by manfred99's avatar manfred99
Browse files

attribute update: trim attribute names to 23 chars


git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@2972 4ea69e1a-61f1-4043-bf83-b5c94c648137
parent 69b50378
Branches
No related tags found
No related merge requests found
...@@ -43,6 +43,9 @@ NOTES FOR FUTURE RELEASES: see TODO file. ...@@ -43,6 +43,9 @@ 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] attribute update:
trim attribute names to 23 chars
[CF] Add smart pointer class template to manage device object pointers. [CF] Add smart pointer class template to manage device object pointers.
Remove related 'delete' calls and 'try/catch' blocks. Remove related 'delete' calls and 'try/catch' blocks.
......
...@@ -1920,6 +1920,8 @@ int64_t ataPrintSmartAttribRawValue(char *out, ...@@ -1920,6 +1920,8 @@ int64_t ataPrintSmartAttribRawValue(char *out,
// manufacturers use different attribute IDs for an attribute with the // manufacturers use different attribute IDs for an attribute with the
// same name. The variable val should contain a non-zero value if a particular // same name. The variable val should contain a non-zero value if a particular
// attributes has a non-default interpretation. // attributes has a non-default interpretation.
// Attribute names shouldn't be longer than 23 chars, otherwise they break the
// output of smartctl.
void ataPrintSmartAttribName(char * out, unsigned char id, const unsigned char * definitions){ void ataPrintSmartAttribName(char * out, unsigned char id, const unsigned char * definitions){
const char *name; const char *name;
unsigned char val; unsigned char val;
...@@ -2043,7 +2045,7 @@ void ataPrintSmartAttribName(char * out, unsigned char id, const unsigned char * ...@@ -2043,7 +2045,7 @@ void ataPrintSmartAttribName(char * out, unsigned char id, const unsigned char *
switch (val) { switch (val) {
case 1: case 1:
// Fujitsu // Fujitsu
name="Emergency_Retract_Cycle_Ct"; name="Emerg_Retract_Cycle_Ct";
break; break;
default: default:
name="Power-Off_Retract_Count"; name="Power-Off_Retract_Count";
...@@ -2097,7 +2099,7 @@ void ataPrintSmartAttribName(char * out, unsigned char id, const unsigned char * ...@@ -2097,7 +2099,7 @@ void ataPrintSmartAttribName(char * out, unsigned char id, const unsigned char *
break; break;
case 2: case 2:
// Fujitsu // Fujitsu
name="Off-line_Scan_UNC_Sector_Ct"; name="Offline_Scan_UNC_SectCt";
break; break;
} }
break; break;
...@@ -2211,7 +2213,7 @@ void ataPrintSmartAttribName(char * out, unsigned char id, const unsigned char * ...@@ -2211,7 +2213,7 @@ void ataPrintSmartAttribName(char * out, unsigned char id, const unsigned char *
break; break;
case 232: case 232:
// seen in Intel X25-E SSD // seen in Intel X25-E SSD
name="Available_Reserved_Space"; name="Available_Reservd_Space";
break; break;
case 233: case 233:
// seen in Intel X25-E SSD // seen in Intel X25-E SSD
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment