There is no requirement to act on FileIoPriorityHintInfo Return success when this is passed to SetFileInformationByHandle
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46130 Signed-off-by: Greg Smith codedonewell@gmail.com --- Ignoring hint with success after wine-devel discussion https://www.winehq.org/pipermail/wine-devel/2018-November/134925.html https://www.winehq.org/pipermail/wine-devel/2018-November/134985.html --- dlls/kernel32/file.c | 5 ++++- dlls/kernel32/tests/file.c | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/dlls/kernel32/file.c b/dlls/kernel32/file.c index eeccf67e15..80f4a2190d 100644 --- a/dlls/kernel32/file.c +++ b/dlls/kernel32/file.c @@ -1103,7 +1103,6 @@ BOOL WINAPI SetFileInformationByHandle( HANDLE file, FILE_INFO_BY_HANDLE_CLASS c case FileStreamInfo: case FileIdBothDirectoryInfo: case FileIdBothDirectoryRestartInfo: - case FileIoPriorityHintInfo: case FileFullDirectoryInfo: case FileFullDirectoryRestartInfo: case FileStorageInfo: @@ -1119,6 +1118,10 @@ BOOL WINAPI SetFileInformationByHandle( HANDLE file, FILE_INFO_BY_HANDLE_CLASS c status = NtSetInformationFile( file, &io, info, size, FileDispositionInformation ); break;
+ case FileIoPriorityHintInfo: + FIXME( "Ignoring file IO priority hint: %p, %u, %p, %u\n", file, class, info, size ); + return TRUE; + case FileStandardInfo: case FileCompressionInfo: case FileAttributeTagInfo: diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c index 168bdd5e7b..3499ba62f6 100644 --- a/dlls/kernel32/tests/file.c +++ b/dlls/kernel32/tests/file.c @@ -4914,6 +4914,7 @@ static void test_SetFileInformationByHandle(void) FILE_STANDARD_INFO stdinfo = { {{0}},{{0}},0,FALSE,FALSE }; FILE_COMPRESSION_INFO compressinfo; FILE_DISPOSITION_INFO dispinfo; + FILE_IO_PRIORITY_HINT_INFO hintinfo; char tempFileName[MAX_PATH]; char tempPath[MAX_PATH]; HANDLE file; @@ -4967,6 +4968,12 @@ todo_wine ret = pSetFileInformationByHandle(file, FileDispositionInfo, &dispinfo, sizeof(dispinfo)); ok(ret, "setting FileDispositionInfo failed, error %d\n", GetLastError());
+ /* FileIoPriorityHintInfo: Star Citizen installer fails when this call does not return sucess */ + memset(&hintinfo,0,sizeof(hintinfo)); + hintinfo.PriorityHint = IoPriorityHintNormal; + ret = pSetFileInformationByHandle(file, FileIoPriorityHintInfo, &hintinfo, sizeof(hintinfo)); + ok(ret, "setting FileIoPriorityHintInfo got %d, error %d\n", ret, GetLastError()); + CloseHandle(file); }
Hi,
While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=44496
Your paranoid android.
=== wvistau64 (64 bit report) ===
kernel32: file.c:4975: Test failed: setting FileIoPriorityHintInfo got 0, error 998
=== w2008s64 (64 bit report) ===
kernel32: file.c:4975: Test failed: setting FileIoPriorityHintInfo got 0, error 998
=== w7pro64 (64 bit report) ===
kernel32: file.c:4975: Test failed: setting FileIoPriorityHintInfo got 0, error 998
=== w864 (64 bit report) ===
kernel32: file.c:4975: Test failed: setting FileIoPriorityHintInfo got 0, error 998
=== w1064 (64 bit report) ===
kernel32: file.c:4975: Test failed: setting FileIoPriorityHintInfo got 0, error 998
=== debian9 (64 bit WoW report) ===
kernel32: change.c:318: Test failed: should be ready