Skip to contentSkip to conversation

can't read sectors with SG_IO

DISCUSSION Kantor Zsolt 1 participant 1 message Oct 9, 2007 libata

lore
Share & tools
lore
#0 lore raw

Hi,I want to read for instance 1 sector from my ATA hard disk with the SG_IO ioctl.I havecreated,set the fields for the SG_IO ioctl,it returns 0 but no data in the buffer.I even used the hdparm 7.7 sg16 function to read sectors from the ATA device but no data came back.After the ioctl is executed the sense buffer,status,device_status contains data so there is a problem but I don't know what kind.For instance the identify command works,so I can not read,and probably write sectors.It is not possible to read sectors with SG_IO ? and how ?

Thanks
Kantor

      ____________________________________________________________________________________

Check out the hottest 2008 models today at Yahoo! Autos.
http://autos.yahoo.com/new_cars.html