ntdll: Correctly fill DataTransferLength in SCSI_PASS_THROUGH and SCSI_PASS_THROUGH_DIRECT.
DataTransferLength specifies the number of bytes transferred, but sg_io_hdr_t.resid gives the number of bytes *not* transferred: https://www.tldp.org/HOWTO/SCSI-Generic-HOWTO/x356.html Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47424 Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
1ba7247a4f
commit
bf891f34af
|
@ -1658,7 +1658,7 @@ static NTSTATUS CDROM_ScsiPassThroughDirect(int fd, PSCSI_PASS_THROUGH_DIRECT pP
|
|||
io = ioctl(fd, SG_IO, &cmd);
|
||||
|
||||
pPacket->ScsiStatus = cmd.status;
|
||||
pPacket->DataTransferLength = cmd.resid;
|
||||
pPacket->DataTransferLength -= cmd.resid;
|
||||
pPacket->SenseInfoLength = cmd.sb_len_wr;
|
||||
|
||||
ret = CDROM_GetStatusCode(io);
|
||||
|
@ -1842,7 +1842,7 @@ static NTSTATUS CDROM_ScsiPassThrough(int fd, PSCSI_PASS_THROUGH pPacket)
|
|||
io = ioctl(fd, SG_IO, &cmd);
|
||||
|
||||
pPacket->ScsiStatus = cmd.status;
|
||||
pPacket->DataTransferLength = cmd.resid;
|
||||
pPacket->DataTransferLength -= cmd.resid;
|
||||
pPacket->SenseInfoLength = cmd.sb_len_wr;
|
||||
|
||||
ret = CDROM_GetStatusCode(io);
|
||||
|
|
Loading…
Reference in New Issue