I need to get specifications of hard disk on both Win and *nix machines. I used on Linux like this:
static struct hd_driveid hd;
For GNU/Linux have a look at this: obtaining hard disk metadata