Can anyone explain the core difference between
From the Linux documentation and this document titled: Summary of HDIO_ ioctl calls., I know that the former is for "getting device geometries" and the latter for "getting IDE identification info".
In the HDIO summary document, it is said that the object of "struct hd_geometry" is passed as an argument to a "ioctl" call and it will contain the "number of sectors".
HDIO_GET_IDENTITY returns an unsigned char array. But from this SO question, I hope that
struct hd_driveid contains the bytes per sector and other info. And I read somewhere that
hd_driveid can be passed as an argument to
HDIO_GET_IDNTITY is used in the call.
I need a clarification for all these doubts..
HDIO_ ioctl call should I use to get the number of sectors and bytes per sector of my hard disk in Linux?