If a disk advertises ATA/ATAPI-4 support or greater, no
ATA/ATAPI supported versions will be displayed by
'hdparm -i /dev/hdX'.
This patch displays ATA/ATAPI support <= 7 (as per the
currently published specification) and will simply
ignore currently reserved bits (though this patch could
be trivially modified to display > ATA/ATAPI-7 because
we do know the allocations with some certainty). For
specificity, this patch also modifies the output to
include "ATA/ATAPI-" for each supported version rather
than just using the numeric identifier. This may be
handy should future specs use different phraseology.
Also, this patch modifies the verbose minor version
value "device does not report version" to the more
concise string "Unspecified".
There could be significantly better handling of major
and minor version values, but this is a start. Also,
it might be best to change the order of output to
display minor version last or on a separate line, as it
seems much less likely than the major version to be
specified by the vendor....
Log in to post a comment.