Opened 22 months ago
Closed 22 months ago
#1696 closed patch (fixed)
Function ataReadExtSelfTestLog didn't swap byte-order for all little-endian variables on big-endian platform
Reported by: | WHR | Owned by: | Christian Franke |
---|---|---|---|
Priority: | minor | Milestone: | Release 7.4 |
Component: | smartctl | Version: | |
Keywords: | ata bigendian | Cc: |
Description
Due this bug, only 1 log entry gets correctly swapped, results in wrong values being displayed on big-endian platforms.
For example:
# smartctl -l selftest /dev/sdd smartctl pre-7.4 2023-02-12 r5455 [ppc64-linux-4.19.271-rivoreo-powerpc64-largepage] (local build) Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org === START OF READ SMART DATA SECTION === SMART Self-test log structure revision number 1 Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error # 1 Short offline Completed without error 00% 736 - # 2 Extended offline Aborted by host 90% 736 - # 3 Short offline Completed without error 00% 735 - # 4 Extended offline Aborted by host 90% 50 - # 5 Short offline Completed without error 00% 50 - # 6 Extended offline Completed without error 00% 42 - # smartctl -l xselftest /dev/sdd smartctl pre-7.4 2023-02-12 r5455 [ppc64-linux-4.19.271-rivoreo-powerpc64-largepage] (local build) Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org === START OF READ SMART DATA SECTION === SMART Extended Self-test Log Version: 1 (1 sectors) Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error # 1 Short offline Completed without error 00% 57346 - # 2 Extended offline Aborted by host 90% 57346 - # 3 Short offline Completed without error 00% 57090 - # 4 Extended offline Aborted by host 90% 12800 - # 5 Short offline Completed without error 00% 12800 - # 6 Extended offline Completed without error 00% 42 -
Here the timestamps in the extended self-test log (xselftest) are incorrectly displayed except the last one.
Attachments (2)
Change History (4)
by , 22 months ago
Attachment: | smartmontools-ata-extselftestlog-big-endian-fix.diff added |
---|
comment:1 by , 22 months ago
Keywords: | ata bigendian added; byte-order powerpc removed |
---|---|
Milestone: | → Release 7.4 |
Owner: | set to |
Status: | new → accepted |
by , 22 months ago
Attachment: | changelog.diff added |
---|
comment:2 by , 22 months ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Applied in r5456, thanks!
Note:
See TracTickets
for help on using tickets.
Thanks for catching this obvious long standing (r2773) bug. BE use cases of smartctl are apparently rare.
Feel free to also provide a patch for the
ChangeLog
file. Use<...>
for the email address if you want to provide a real name without an email address.