Ticket #1696: smartmontools-ata-extselftestlog-big-endian-fix.diff

File smartmontools-ata-extselftestlog-big-endian-fix.diff, 561 bytes (added by WHR, 15 months ago)
  • atacmds.cpp

     
    10671067  check_multi_sector_sum(log, nsectors, "SMART Extended Self-test Log Structure");
    10681068
    10691069  if (isbigendian()) {
    1070     SWAPV(log->log_desc_index);
    10711070    for (unsigned i = 0; i < nsectors; i++) {
     1071      SWAPV(log[i].log_desc_index);
    10721072      for (unsigned j = 0; j < 19; j++)
    1073         SWAPV(log->log_descs[i].timestamp);
     1073        SWAPV(log[i].log_descs[j].timestamp);
    10741074    }
    10751075  }
    10761076  return true;