Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP3:Update
smartmontools
smartmontools-smartctl-NVMe-big-endian.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File smartmontools-smartctl-NVMe-big-endian.patch of Package smartmontools
Index: smartmontools-7.2/nvmecmds.cpp =================================================================== --- smartmontools-7.2.orig/nvmecmds.cpp +++ smartmontools-7.2/nvmecmds.cpp @@ -230,8 +230,9 @@ unsigned nvme_read_error_log(nvme_device unsigned n = nvme_read_log_page(device, 0xffffffff, 0x01, error_log, num_entries * sizeof(*error_log), lpo_sup); + unsigned read_entries = n / sizeof(*error_log); if (isbigendian()) { - for (unsigned i = 0; i < n; i++) { + for (unsigned i = 0; i < read_entries; i++) { swapx(&error_log[i].error_count); swapx(&error_log[i].sqid); swapx(&error_log[i].cmdid); @@ -242,7 +243,7 @@ unsigned nvme_read_error_log(nvme_device } } - return n / sizeof(*error_log); + return read_entries; } // Read NVMe SMART/Health Information log.
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor