sbin/atactl/atactl.c: revision 1.74
add a whole bunch of S.M.A.R.T. status i found around various sources.
now nothing on my new SSD is unknown, except #249.
was deleted from the filesystem to the disk driver, commonly
known as "discard" or "trim".
fs/driver support is in ffs and ata wd for now.
This is what was posted here:
http://mail-index.netbsd.org/tech-kern/2012/02/28/msg012813.html
with minor cleanup, and the global switch replaced by a mount option.
information to atactl identify output.
Also:
- remove caddr_t cast
- warn about invalid IDENTIFY data checksum (when possible)
- humanize capacity in power-of-10 format
- remove semi-pointless ATAPI check
- slightly rework command queue depth output to be less conversational
- Capitialize "Name" in World Wide Name.
- Print the World Wide Name if it exists.
- Use LBA48 maximum address when available for "total sectors" output.
- So that geometry will display on more drives, don't be as strict when
checking for non-ATAPI devices. (This seemed to be an issue on at least
one instance of a Caviar SE16 drive.)
- Check more carefully for valid/relevant queue depth before printing it.
- Increment the queue depth by one for display.
While here, wrap some long lines that I should have had wrapped before they
were commited in rev. 1.46.
the "security" extension and to "freeze" it. With the security extension
frozen, disk passwords cannot be set anymore, until the next hard reset.
Normally, this is the business of the BIOS, but older/buggy/embedded
BIOSes don't care. This leaves the (theoretical) possibility that a
malicious program in posession of superuser rights sets a disk password,
rendering the disk useless (or at least uneconomical to recover from).
Inspired by an article in the german "ct" magazine.
Being here, consolidate the implementations of IDENTIFY into one, and
fix an obvious alignment problem.