Commit bf891f34 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

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=47424Signed-off-by: 's avatarZebediah Figura <z.figura12@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 1ba7247a
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment