You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Updated ML-patchset
Dropped the FILE_FLAG_WRITE_THROUGH patches since they appear to be breaking multiple applications. Bug 45599, 45604.
This commit is contained in:
@@ -1,50 +0,0 @@
|
||||
From 370536ad1d8c13a25567d940b86f29a614c66ad8 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Thu, 2 Aug 2018 14:04:38 +0800
|
||||
Subject: [PATCH 1/3] kernel32: Add support for MOVEFILE_WRITE_THROUGH to
|
||||
MoveFile.
|
||||
|
||||
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
---
|
||||
dlls/kernel32/path.c | 11 ++++++-----
|
||||
1 file changed, 6 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/path.c b/dlls/kernel32/path.c
|
||||
index a389743..6d2a902 100644
|
||||
--- a/dlls/kernel32/path.c
|
||||
+++ b/dlls/kernel32/path.c
|
||||
@@ -1283,6 +1283,7 @@ BOOL WINAPI MoveFileWithProgressW( LPCWSTR source, LPCWSTR dest,
|
||||
NTSTATUS status;
|
||||
HANDLE source_handle = 0, dest_handle;
|
||||
ANSI_STRING source_unix, dest_unix;
|
||||
+ DWORD options;
|
||||
|
||||
TRACE("(%s,%s,%p,%p,%04x)\n",
|
||||
debugstr_w(source), debugstr_w(dest), fnProgress, param, flag );
|
||||
@@ -1293,9 +1294,6 @@ BOOL WINAPI MoveFileWithProgressW( LPCWSTR source, LPCWSTR dest,
|
||||
if (!dest)
|
||||
return DeleteFileW( source );
|
||||
|
||||
- if (flag & MOVEFILE_WRITE_THROUGH)
|
||||
- FIXME("MOVEFILE_WRITE_THROUGH unimplemented\n");
|
||||
-
|
||||
/* check if we are allowed to rename the source */
|
||||
|
||||
if (!RtlDosPathNameToNtPathName_U( source, &nt_name, NULL, NULL ))
|
||||
@@ -1336,8 +1334,11 @@ BOOL WINAPI MoveFileWithProgressW( LPCWSTR source, LPCWSTR dest,
|
||||
SetLastError( ERROR_PATH_NOT_FOUND );
|
||||
goto error;
|
||||
}
|
||||
- status = NtOpenFile( &dest_handle, GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE, &attr, &io, 0,
|
||||
- FILE_NON_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT );
|
||||
+
|
||||
+ options = FILE_NON_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT;
|
||||
+ if (flag & MOVEFILE_WRITE_THROUGH)
|
||||
+ options |= FILE_WRITE_THROUGH;
|
||||
+ status = NtOpenFile( &dest_handle, GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE, &attr, &io, 0, options );
|
||||
if (status == STATUS_SUCCESS) /* destination exists */
|
||||
{
|
||||
NtClose( dest_handle );
|
||||
--
|
||||
1.9.1
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
From dfa61702f635d6ae7773e9e846800a77f179337c Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Thu, 2 Aug 2018 14:01:53 +0800
|
||||
Subject: [PATCH 2/3] server: Add support for FILE_WRITE_THROUGH to
|
||||
create_file() request.
|
||||
|
||||
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
---
|
||||
server/file.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/server/file.c b/server/file.c
|
||||
index 446621a..9299530 100644
|
||||
--- a/server/file.c
|
||||
+++ b/server/file.c
|
||||
@@ -224,6 +224,11 @@ static struct object *create_file( struct fd *root, const char *nameptr, data_si
|
||||
default: set_error( STATUS_INVALID_PARAMETER ); goto done;
|
||||
}
|
||||
|
||||
+#ifdef O_DIRECT
|
||||
+ if (options & FILE_WRITE_THROUGH)
|
||||
+ flags |= O_DIRECT;
|
||||
+#endif
|
||||
+
|
||||
if (sd)
|
||||
{
|
||||
const SID *owner = sd_get_owner( sd );
|
||||
--
|
||||
1.9.1
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
From 83896a0c6bf2756273793f5d998259e7545fe15e Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Thu, 2 Aug 2018 14:04:13 +0800
|
||||
Subject: [PATCH 3/3] kernel32: Add support for FILE_FLAG_WRITE_THROUGH to
|
||||
CreateFile.
|
||||
|
||||
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
---
|
||||
dlls/kernel32/file.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/dlls/kernel32/file.c b/dlls/kernel32/file.c
|
||||
index 1e5b9fe..1b33cfb 100644
|
||||
--- a/dlls/kernel32/file.c
|
||||
+++ b/dlls/kernel32/file.c
|
||||
@@ -1560,6 +1560,8 @@ HANDLE WINAPI CreateFileW( LPCWSTR filename, DWORD access, DWORD sharing,
|
||||
options |= FILE_SYNCHRONOUS_IO_NONALERT;
|
||||
if (attributes & FILE_FLAG_RANDOM_ACCESS)
|
||||
options |= FILE_RANDOM_ACCESS;
|
||||
+ if (attributes & FILE_FLAG_WRITE_THROUGH)
|
||||
+ options |= FILE_WRITE_THROUGH;
|
||||
attributes &= FILE_ATTRIBUTE_VALID_FLAGS;
|
||||
|
||||
attr.Length = sizeof(attr);
|
||||
--
|
||||
1.9.1
|
||||
|
||||
Reference in New Issue
Block a user