martijnvanbrummelen / nwipe

nwipe secure disk eraser
GNU General Public License v2.0
688 stars 79 forks source link

HPA_DCO_011 Continuation of HPA/DCO integration. #463

Closed PartialVolume closed 1 year ago

PartialVolume commented 1 year ago

Fixed a issue that occurs when a drive is attached via a USB adapter that doesn't correctly pass the ATA commands for HPA/DCO determination.

It incorrectly set the HPA_status as enabled when in fact it should have determined that DCO was accessible and a comparison against the size as returned by libata and the real max sectors which in this particular adapters case worked, was sufficient to correctly determine whether there were hidden sectors or not.

Now fixed, so HPA status is now determined correctly even on some less than ideal USB adapters.