Reverse the direction of raw SCSI commands.

This commit is contained in:
Tobias Gruetzmacher 2005-08-08 11:02:32 +00:00 committed by Alexandre Julliard
parent 91358d76c3
commit cdd75bd413
1 changed files with 4 additions and 4 deletions

View File

@ -1470,10 +1470,10 @@ static NTSTATUS CDROM_ScsiPassThroughDirect(int fd, PSCSI_PASS_THROUGH_DIRECT pP
switch (pPacket->DataIn) switch (pPacket->DataIn)
{ {
case SCSI_IOCTL_DATA_IN: case SCSI_IOCTL_DATA_IN:
cmd.dxfer_direction = SG_DXFER_TO_DEV; cmd.dxfer_direction = SG_DXFER_FROM_DEV;
break; break;
case SCSI_IOCTL_DATA_OUT: case SCSI_IOCTL_DATA_OUT:
cmd.dxfer_direction = SG_DXFER_FROM_DEV; cmd.dxfer_direction = SG_DXFER_TO_DEV;
break; break;
case SCSI_IOCTL_DATA_UNSPECIFIED: case SCSI_IOCTL_DATA_UNSPECIFIED:
cmd.dxfer_direction = SG_DXFER_NONE; cmd.dxfer_direction = SG_DXFER_NONE;
@ -1593,10 +1593,10 @@ static NTSTATUS CDROM_ScsiPassThrough(int fd, PSCSI_PASS_THROUGH pPacket)
switch (pPacket->DataIn) switch (pPacket->DataIn)
{ {
case SCSI_IOCTL_DATA_IN: case SCSI_IOCTL_DATA_IN:
cmd.dxfer_direction = SG_DXFER_TO_DEV; cmd.dxfer_direction = SG_DXFER_FROM_DEV;
break; break;
case SCSI_IOCTL_DATA_OUT: case SCSI_IOCTL_DATA_OUT:
cmd.dxfer_direction = SG_DXFER_FROM_DEV; cmd.dxfer_direction = SG_DXFER_TO_DEV;
break; break;
case SCSI_IOCTL_DATA_UNSPECIFIED: case SCSI_IOCTL_DATA_UNSPECIFIED:
cmd.dxfer_direction = SG_DXFER_NONE; cmd.dxfer_direction = SG_DXFER_NONE;