Skip to content

Commit

Permalink
Merge pull request #605 from PartialVolume/Fix_SAS_HPA-DCO
Browse files Browse the repository at this point in the history
Fixes a issue where SAS drives always respond with hidden sectors = ??? , i.e a warning.
  • Loading branch information
PartialVolume authored Sep 12, 2024
2 parents 710478d + 0fbc1ab commit 8a93e88
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions src/hpa_dco.c
Original file line number Diff line number Diff line change
Expand Up @@ -570,13 +570,22 @@ int hpa_dco_status( nwipe_context_t* ptr )
* through */
if( c->HPA_reported_set == 0 && c->HPA_reported_real == 0 && c->DCO_reported_real_max_sectors <= 1 )
{
c->HPA_status = HPA_UNKNOWN;
if( c->device_bus == NWIPE_DEVICE_USB )
if( c->device_bus == NWIPE_DEVICE_SAS )
{
nwipe_log( NWIPE_LOG_WARNING,
"HIDDEN SECTORS INDETERMINATE! on %s, Some USB adapters & memory sticks don't support "
"ATA pass through",
c->device_name );
/* SAS SCSI doesn't appear to support HPA/DCO commands */
c->HPA_status = HPA_NOT_APPLICABLE;
nwipe_log( NWIPE_LOG_INFO, "No hidden sectors on %s", c->device_name );
}
else
{
c->HPA_status = HPA_UNKNOWN;
if( c->device_bus == NWIPE_DEVICE_USB )
{
nwipe_log( NWIPE_LOG_WARNING,
"HIDDEN SECTORS INDETERMINATE! on %s, Some USB adapters & memory sticks don't support "
"ATA pass through",
c->device_name );
}
}
}
else
Expand Down

0 comments on commit 8a93e88

Please sign in to comment.