I wrote a program to get the details of hard disk drive using HDIO_ ioctl calls.For writing program, I'm referring Documentation/ioctl/hdio.txt in kernel source(2.6.32).Here is my main part of code:fd = open(/dev/sda, O_RDONLY);  // validated fd.retval = ioctl(fd, HDIO_GET_IDENTITY, &driveid);if(retval < 0) {            perror(ioctl(HDIO_GET_IDENTITY));            exit(3);}When I run(as root) the above code, I got below error:ioctl(HDIO_GET_IDENTITY): Invalid argumentWhat is the wrong in the program?Why I'm getting error?Additional Info: OS: CentOS-6.5, kernel version: 2.6.32, IA:x86_64 (running on VMware).Result of hdparm -i /dev/sda isSG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00HDIO_GET_IDENTITY failed: Invalid argument
ioctl: invalid argument for HDIO_GET_IDENTITY
centos;hard disk;c