forked from Mirrors/wine-wine
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>
(cherry picked from commit bf891f34af
)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
oldstable
parent
a2ea837849
commit
3c8c47b1fb
|
@ -1661,7 +1661,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);
|
||||
|
@ -1845,7 +1845,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