@@ -255,7 +307,7 @@ SCSI_LinuxSetTimeout( int fd, int timeout )
}
/* This function takes care of the write/read to the linux sg device.
* It returns TRUE or FALSE and uses FILE_SetDosError() to convert
* It returns TRUE or FALSE and uses set_last_error() to convert
* UNIX errno to Windows GetLastError(). The reason for that is that
* several programs will check that error and we might as well set
* it here. We also return the value of the read call in
...
...
@@ -274,9 +326,10 @@ SCSI_LinuxDeviceIo( int fd,
dwBytes=write(fd,lpInBuffer,cbInBuffer);
if(dwBytes!=cbInBuffer)
{
FILE_SetDosError();
set_last_error();
save_error=GetLastError();
WARN("Not enough bytes written to scsi device. bytes=%ld .. %ld\n",cbInBuffer,dwBytes);
/* FIXME: set_last_error() never sets error to ERROR_NOT_ENOUGH_MEMORY... */
if(save_error==ERROR_NOT_ENOUGH_MEMORY)
MESSAGE("Your Linux kernel was not able to handle the amount of data sent to the scsi device. Try recompiling with a larger SG_BIG_BUFF value (kernel 2.0.x sg.h)");