hddtemp-0.3-beta15-satacmds.patch 986 B

123456789101112131415161718192021222324252627
  1. diff -Naurp hddtemp-0.3-beta15-orig/src/satacmds.c hddtemp-0.3-beta15/src/satacmds.c
  2. --- hddtemp-0.3-beta15-orig/src/satacmds.c 2007-02-10 14:25:15.000000000 +0100
  3. +++ hddtemp-0.3-beta15/src/satacmds.c 2007-02-10 14:26:53.000000000 +0100
  4. @@ -54,7 +54,6 @@ int sata_pass_thru(int device, unsigned
  5. unsigned char cdb[16];
  6. unsigned char sense[32];
  7. int dxfer_direction;
  8. - int ret;
  9. memset(cdb, 0, sizeof(cdb));
  10. cdb[0] = ATA_16;
  11. @@ -78,13 +77,7 @@ int sata_pass_thru(int device, unsigned
  12. cdb[6] = cmd[1];
  13. cdb[14] = cmd[0];
  14. - ret = scsi_SG_IO(device, cdb, sizeof(cdb), buffer, cmd[3] * 512, sense, sizeof(sense), dxfer_direction);
  15. -
  16. - /* Verify SATA magics */
  17. - if (sense[0] != 0x72 || sense[7] != 0x0e || sense[9] != 0x0e || sense[10] != 0x00)
  18. - return 1;
  19. - else
  20. - return ret;
  21. + return scsi_SG_IO(device, cdb, sizeof(cdb), buffer, cmd[3] * 512, sense, sizeof(sense), dxfer_direction);
  22. }
  23. void sata_fixstring(unsigned char *s, int bytecount)