Test for hdio.c

Bran S archsbran at gmail.com
Tue Mar 24 17:19:49 UTC 2020


Hi guys,

I am writing a test for hdio.c.
To do so I am calling ioctl as:
`ioctl(fd, HDIO_GETGEO, &geom);`.

Here geom is the geometry struct, and fd is the file descriptor.
Now the problem I am facing is: what should be the file descriptor ?
What file or device should the file descriptor refer to ?
If we are talking about the harddrive then should it refer to /dev/sda ?

Please share your ideas.


More information about the Strace-devel mailing list