Ignoring the preferred node should be good enough
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46927 Signed-off-by: Fabian Maurer dark.shadow4@web.de --- dlls/kernel32/kernel32.spec | 2 +- dlls/kernel32/virtual.c | 27 +++++++++++++++++++++++++++ include/winbase.h | 1 + 3 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index c8d52cec58..1cf7b58a02 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -1559,7 +1559,7 @@ @ stdcall VerifyVersionInfoW(long long int64) @ stdcall VirtualAlloc(ptr long long long) @ stdcall VirtualAllocEx(long ptr long long long) -# @ stub VirtualAllocExNuma +@ stdcall VirtualAllocExNuma(long ptr long long long long) @ stub VirtualBufferExceptionHandler @ stdcall VirtualFree(ptr long long) @ stdcall VirtualFreeEx(long ptr long long) diff --git a/dlls/kernel32/virtual.c b/dlls/kernel32/virtual.c index 42da7f0d8c..35ca4c0876 100644 --- a/dlls/kernel32/virtual.c +++ b/dlls/kernel32/virtual.c @@ -46,6 +46,7 @@
WINE_DECLARE_DEBUG_CHANNEL(seh); WINE_DECLARE_DEBUG_CHANNEL(file); +WINE_DECLARE_DEBUG_CHANNEL(virtual);
/*********************************************************************** @@ -100,6 +101,32 @@ LPVOID WINAPI DECLSPEC_HOTPATCH VirtualAllocEx( HANDLE hProcess, LPVOID addr, SI return ret; }
+/*********************************************************************** + * VirtualAllocExNuma (KERNEL32.@) + * + * Seems to be just as VirtualAllocEx, but with a preferred NUMA node. + * + * PARAMS + * process [I] Handle to process to do mem operation. + * addr [I] Address of region to reserve or commit. + * size [I] Size of region. + * type [I] Type of allocation. + * protect [I] Type of access protection. + * numa_node[I] Preferred NUMA node. + * + * + * RETURNS + * Success: Base address of allocated region of pages. + * Failure: NULL. + */ +LPVOID WINAPI DECLSPEC_HOTPATCH VirtualAllocExNuma(HANDLE process, void *addr, SIZE_T size, + DWORD type, DWORD protect, DWORD numa_node) +{ + FIXME_(virtual)("Ignoring preferred numa_node\n"); + + return VirtualAllocEx(process, addr, size, type, protect); +} +
/*********************************************************************** * VirtualFree (KERNEL32.@) diff --git a/include/winbase.h b/include/winbase.h index 20c73af319..49d0e7ed08 100644 --- a/include/winbase.h +++ b/include/winbase.h @@ -2698,6 +2698,7 @@ WINBASEAPI BOOL WINAPI VerifyVersionInfoW(LPOSVERSIONINFOEXW,DWORD,DWORDL #define VerifyVersionInfo WINELIB_NAME_AW(VerifyVersionInfo) WINBASEAPI LPVOID WINAPI VirtualAlloc(LPVOID,SIZE_T,DWORD,DWORD); WINBASEAPI LPVOID WINAPI VirtualAllocEx(HANDLE,LPVOID,SIZE_T,DWORD,DWORD); +WINBASEAPI LPVOID WINAPI VirtualAllocExNuma(HANDLE,void*,SIZE_T,DWORD,DWORD,DWORD); WINBASEAPI BOOL WINAPI VirtualFree(LPVOID,SIZE_T,DWORD); WINBASEAPI BOOL WINAPI VirtualFreeEx(HANDLE,LPVOID,SIZE_T,DWORD); WINBASEAPI BOOL WINAPI VirtualLock(LPVOID,SIZE_T); -- 2.21.0
Follow up to https://bugs.winehq.org/show_bug.cgi?id=46927
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46934 Signed-off-by: Fabian Maurer dark.shadow4@web.de --- dlls/kernel32/file.c | 25 +++++++++++++++++++++++++ dlls/kernel32/kernel32.spec | 4 ++-- dlls/kernel32/tests/file.c | 15 +++++++++++++++ include/winbase.h | 13 +++++++++++++ 4 files changed, 55 insertions(+), 2 deletions(-)
diff --git a/dlls/kernel32/file.c b/dlls/kernel32/file.c index 3214d724cb..aa3eb34d38 100644 --- a/dlls/kernel32/file.c +++ b/dlls/kernel32/file.c @@ -2349,6 +2349,31 @@ BOOL WINAPI FindNextFileA( HANDLE handle, WIN32_FIND_DATAA *data ) }
+/************************************************************************** + * FindFirstStreamW (KERNEL32.@) + */ +HANDLE WINAPI FindFirstStreamW(LPCWSTR filename, STREAM_INFO_LEVELS infolevel, + void *data, DWORD flags) +{ + FIXME("(%s, %d, %p, %x): stub!\n", debugstr_w(filename), infolevel, data, flags); + + SetLastError(ERROR_HANDLE_EOF); + return INVALID_HANDLE_VALUE; +} + + +/************************************************************************** + * FindNextStreamW (KERNEL32.@) + */ +BOOL WINAPI FindNextStreamW(HANDLE handle, void *data) +{ + FIXME("(%p, %p): stub!\n", handle, data); + + SetLastError(ERROR_HANDLE_EOF); + return FALSE; +} + + /************************************************************************** * GetFileAttributesW (KERNEL32.@) */ diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index 1cf7b58a02..776d83bc84 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -488,7 +488,7 @@ # @ stub FindFirstFileTransactedW @ stdcall FindFirstFileW(wstr ptr) # @ stub FindFirstStreamTransactedW -# @ stub FindFirstStreamW +@ stdcall FindFirstStreamW(wstr long ptr long) @ stdcall FindFirstVolumeA(ptr long) @ stdcall FindFirstVolumeMountPointA(str ptr long) @ stdcall FindFirstVolumeMountPointW(wstr ptr long) @@ -497,7 +497,7 @@ @ stdcall FindNextFileA(long ptr) # @ stub FindNextFileNameW @ stdcall FindNextFileW(long ptr) -# @ stub FindNextStreamW +@ stdcall FindNextStreamW(long ptr) @ stdcall FindNextVolumeA(long ptr long) @ stub FindNextVolumeMountPointA @ stub FindNextVolumeMountPointW diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c index 33b17aa327..adf849590e 100644 --- a/dlls/kernel32/tests/file.c +++ b/dlls/kernel32/tests/file.c @@ -5228,6 +5228,20 @@ static void test_overlapped_read(void) ok(ret, "Unexpected error %u.\n", GetLastError()); }
+static void test_find_file_stream(void) +{ + WCHAR path[] = {'C',':','\','w','i','n','d','o','w','s',0}; + HANDLE handle; + int error; + WIN32_FIND_STREAM_DATA data; + + SetLastError(0xdeadbeef); + handle = FindFirstStreamW(path, FindStreamInfoStandard, &data, 0); + error = GetLastError(); + ok(handle == INVALID_HANDLE_VALUE, "Expected INVALID_HANDLE_VALUE, got %x\n", handle); + ok(error == ERROR_HANDLE_EOF, "Expected ERROR_HANDLE_EOF, got %d\n", error); +} + START_TEST(file) { char temp_path[MAX_PATH]; @@ -5298,4 +5312,5 @@ START_TEST(file) test_GetFileAttributesExW(); test_post_completion(); test_overlapped_read(); + test_find_file_stream(); } diff --git a/include/winbase.h b/include/winbase.h index 49d0e7ed08..c2e216cb91 100644 --- a/include/winbase.h +++ b/include/winbase.h @@ -1717,6 +1717,17 @@ typedef struct _UMS_SCHEDULER_STARTUP_INFO typedef enum _RTL_UMS_SCHEDULER_REASON UMS_SCHEDULER_REASON; typedef enum _RTL_UMS_THREAD_INFO_CLASS UMS_THREAD_INFO_CLASS, *PUMS_THREAD_INFO_CLASS;
+typedef enum _STREAM_INFO_LEVELS +{ + FindStreamInfoStandard, + FindStreamInfoMaxInfoLevel +} STREAM_INFO_LEVELS; + +typedef struct _WIN32_FIND_STREAM_DATA { + LARGE_INTEGER StreamSize; + WCHAR cStreamName[MAX_PATH + 36]; +} WIN32_FIND_STREAM_DATA,*PWIN32_FIND_STREAM_DATA; + WINBASEAPI BOOL WINAPI ActivateActCtx(HANDLE,ULONG_PTR *); WINADVAPI BOOL WINAPI AddAccessAllowedAce(PACL,DWORD,DWORD,PSID); WINADVAPI BOOL WINAPI AddAccessAllowedAceEx(PACL,DWORD,DWORD,DWORD,PSID); @@ -2002,10 +2013,12 @@ WINBASEAPI HANDLE WINAPI FindFirstFileExA(LPCSTR,FINDEX_INFO_LEVELS,LPVOID, WINBASEAPI HANDLE WINAPI FindFirstFileExW(LPCWSTR,FINDEX_INFO_LEVELS,LPVOID,FINDEX_SEARCH_OPS,LPVOID,DWORD); #define FindFirstFileEx WINELIB_NAME_AW(FindFirstFileEx) WINADVAPI BOOL WINAPI FindFirstFreeAce(PACL,LPVOID*); +WINBASEAPI HANDLE WINAPI FindFirstStreamW(LPCWSTR,STREAM_INFO_LEVELS,void*,DWORD); WINBASEAPI BOOL WINAPI FindNextChangeNotification(HANDLE); WINBASEAPI BOOL WINAPI FindNextFileA(HANDLE,LPWIN32_FIND_DATAA); WINBASEAPI BOOL WINAPI FindNextFileW(HANDLE,LPWIN32_FIND_DATAW); #define FindNextFile WINELIB_NAME_AW(FindNextFile) +WINBASEAPI BOOL WINAPI FindNextStreamW(HANDLE,void*); WINBASEAPI BOOL WINAPI FindCloseChangeNotification(HANDLE); WINBASEAPI HRSRC WINAPI FindResourceA(HMODULE,LPCSTR,LPCSTR); WINBASEAPI HRSRC WINAPI FindResourceW(HMODULE,LPCWSTR,LPCWSTR); -- 2.21.0
Hi,
While running your changed tests, 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=50210
Your paranoid android.
=== wxppro (32 bit report) ===
kernel32: file: Timeout
=== debian9 (64 bit WoW report) ===
kernel32: change.c:320: Test failed: should be ready