hard disk serial number interrogation

What would be the equivalent QNX4 way of doing the following
(cut from Linux code):

struct hd_driveid hid;
if( !ioctl(fd, HDIO_GET_IDENTITY, &hid) )



This is to try and get the serial number of the disk (I hope it exists
with a QNX formatted disk!) to generate a unique serial for data stored
on the disk.