How can I, from a C program, read the hardware information of a drive? (I.e. to determine if the drive is an SSD or a mechanical disk.)
SSD are supposed to identify themselves as non-rotative. For linux, as example, you can get the info via sysfs:
cat /sys/block/sda/queue/rotational
If it returns 0, you have SSD...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With