Comment 42 for bug 1237519

Revision history for this message
Phillip Susi (psusi) wrote :

The HDIO_GETGEO ioctl has been depreciated for years and will be removed "some day", so user space tools have been moving to reading the sysfs attribute, so I'd prefer not to see more use of the obsolete ioctl. While it isn't quite as simple as the ioctl, it isn't that bad and you should be able to copy/paste the code that does this out of parted's libparted/arch/linux.c, or util-linux's lib/sysfs.c is a bit more complete but complex interface.