[PATCH] wnaspi32: do not crash on SC_GETSET_TIMEOUTS.
Thierry Vermeylen
t_chan4958 at hotmail.com
Sat Feb 11 03:06:03 CST 2017
wnaspi32: do not crash on SC_GETSET_TIMEOUTS.
Currently, SendASPI32Command returns an error for SC_GETSET_TIMEOUTS.
This stops applications that (think they) need this.
This patch always returns succes for SC_GETSET_TIMEOUTS, enhancing
compatibility of Wine.
Tested on Manjaro Linux 16.10.
Signed-off-by: Thierry Vermeylen <t_chan4958 at hotmail.com>
---
dlls/wnaspi32/winaspi32.c | 6 ++++++
include/wnaspi32.h | 11 +++++++++++
2 files changed, 17 insertions(+)
diff --git a/dlls/wnaspi32/winaspi32.c b/dlls/wnaspi32/winaspi32.c
index 0ce72aae01..3a6b9908ea 100644
--- a/dlls/wnaspi32/winaspi32.c
+++ b/dlls/wnaspi32/winaspi32.c
@@ -573,6 +573,12 @@ DWORD __cdecl SendASPI32Command(LPSRB lpSRB)
FIXME("SC_GET_DISK_INFO always return 'int13 unassociated disk'.\n");
lpSRB->diskinfo.SRB_DriveFlags = 0; /* disk is not int13 served */
return SS_COMP;
+ case SC_GETSET_TIMEOUTS: {
+ PSRB_GetSetTimeouts psrb_gst = (PSRB_GetSetTimeouts)lpSRB;
+ FIXME("SC_GETSET_TIMEOUTS doesn't actually change the timeout value nor does it return the current value.\n");
+ psrb_gst->SRB_Status = SS_COMP; /* synchronuous call, should be the same as the return value of SendASPI32Command */
+ return SS_COMP;
+ }
default:
FIXME("Unknown command %d\n", lpSRB->common.SRB_Cmd);
}
diff --git a/include/wnaspi32.h b/include/wnaspi32.h
index 9051f0092e..5b0f8085da 100644
--- a/include/wnaspi32.h
+++ b/include/wnaspi32.h
@@ -200,6 +200,17 @@ typedef struct tagSRB32_GetDiskInfo {
BYTE SRB_Rsvd1[10]; /* 0E Reserved */
} SRB_GetDiskInfo, *PSRB_GetDiskInfo;
+typedef struct tagSRB32_GetSetTimeouts {
+ BYTE SRB_Cmd; /* 00 ASPI cmd code = SC_GETSET_TIMEOUTS */
+ BYTE SRB_Status; /* 01 ASPI command status byte */
+ BYTE SRB_HaId; /* 02 ASPI host adapter number */
+ BYTE SRB_Flags; /* 03 Reserved */
+ DWORD SRB_Hdr_Rsvd; /* 04 Reserved */
+ BYTE SRB_Target; /* 08 Target's SCSI ID */
+ BYTE SRB_Lun; /* 09 Target's LUN number */
+ DWORD SRB_Timeout; /* 10 Target's Timeout value */
+} SRB_GetSetTimeouts, *PSRB_GetSetTimeouts;
+
/* SRB header */
typedef struct tagSRB32_Header {
BYTE SRB_Cmd; /* 00 ASPI cmd code = SC_RESET_DEV */
--
2.11.0
More information about the wine-patches
mailing list