[smartmontools-support] ATA Security Level is broken due to an incorrect bit mask
Christian Franke
Christian.Franke at t-online.de
Fri Aug 4 11:49:56 CEST 2017
Paa Sss wrote:
> smartctl is not reporting the ATA SECURITY LEVEL correctly, when using
> the -g security option. All drives are reported as using the HIGH
> security level.
>
> This is because the bit mask of 0x0020 on line 2491 of ataprint.cpp is
> incorrect.
Yes - 0x0020 actually checks the "Enhanced security erase supported" bit.
> The bit mask should be 0x0100. The function should be:
>
> if (!(state & 0x0100))
> s2 = "HIGH";
> else
> s2 = "MAX";
Thanks for reporting this 5+ years old bug. I will fix this soon.
"smartctl --identify" should already decode word 128 correctly.
Thanks,
Christian
More information about the Smartmontools-support
mailing list