[Disksim-users] Update:new_disk.pl and dx_track errors
hdiakos at csd.uoc.gr
hdiakos at csd.uoc.gr
Sun Sep 6 08:55:08 EDT 2009
After some debugging I found out that the error is generated from file
build_scsi.c in line 153.Adding some diagnostic code the ioctl
function returns -1 and I get the errno error description
"Inappropiate ioctl for device".Here is the modified code:
ictl_val = 0;
int res;
errno = 0;
if ( 0 > ( res = ioctl(fd,SG_SET_FORCE_PACK_ID,&ictl_val) ) ) {
printf("Printing FORCE_PACK_ID:%0x\n", SG_SET_FORCE_PACK_ID);
printf("ioctl returned:%d ERRNO returned:%s\n", res, strerror(errno));
error_handler("Could not set FORCE_PACK_ID on device %s \n",devname);
}
Does anyone have any idea as to what am I doing wrong?It perfectly
finds devices such as sg0 which is a CD/DVD-ROM but it can't find any
device labeled sdaX or sdbX...
More information about the Disksim-users
mailing list