Rebase against 3f6b7c34dbf76fdbf7561a3fe5019713b10d1c9e.

This commit is contained in:
Sebastian Lackner 2017-06-21 00:26:40 +02:00
parent 83a65ef99b
commit e179ddf842
7 changed files with 19 additions and 263 deletions

View File

@ -1,4 +1,4 @@
From 663bd84bef7a95f85a935fe52662186930235237 Mon Sep 17 00:00:00 2001
From 91a2f667bd20e9f4da38f2a3ee2a189a18d8bb0e Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 9 Apr 2017 03:13:25 +0200
Subject: server: Skip async completion when possible.
@ -11,7 +11,7 @@ Subject: server: Skip async completion when possible.
4 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/dlls/ntdll/tests/pipe.c b/dlls/ntdll/tests/pipe.c
index 013eb2b39f..631013c755 100644
index 6846b514dc2..a6f8135624a 100644
--- a/dlls/ntdll/tests/pipe.c
+++ b/dlls/ntdll/tests/pipe.c
@@ -389,9 +389,7 @@ static void test_completion(void)
@ -25,7 +25,7 @@ index 013eb2b39f..631013c755 100644
CloseHandle(ov.hEvent);
diff --git a/server/async.c b/server/async.c
index f9d8af36b9..be7da06b65 100644
index d1cea9a607e..bb3bc325c38 100644
--- a/server/async.c
+++ b/server/async.c
@@ -45,6 +45,7 @@ struct async
@ -59,7 +59,7 @@ index f9d8af36b9..be7da06b65 100644
if (iosb) async->iosb = (struct iosb *)grab_object( iosb );
else async->iosb = NULL;
@@ -326,7 +336,7 @@ void async_set_result( struct object *obj, unsigned int status, apc_param_t tota
@@ -340,7 +350,7 @@ void async_set_result( struct object *obj, unsigned int status, apc_param_t tota
async->status = status;
if (status == STATUS_MORE_PROCESSING_REQUIRED) return; /* don't report the completion */
@ -69,7 +69,7 @@ index f9d8af36b9..be7da06b65 100644
if (async->data.apc)
{
diff --git a/server/fd.c b/server/fd.c
index 288f6976e1..fdbd07ef59 100644
index 7a876917fdd..3d62bae5b84 100644
--- a/server/fd.c
+++ b/server/fd.c
@@ -2381,6 +2381,7 @@ DECL_HANDLER(flush)
@ -80,15 +80,15 @@ index 288f6976e1..fdbd07ef59 100644
release_object( async );
}
release_object( fd );
@@ -2461,6 +2462,7 @@ DECL_HANDLER(read)
{
reply->wait = fd->fd_ops->read( fd, async, req->pos );
reply->options = fd->options;
+ async_skip_completion( async, fd->comp_flags );
release_object( async );
}
release_object( iosb );
@@ -2484,6 +2486,7 @@ DECL_HANDLER(write)
@@ -2457,6 +2458,7 @@ DECL_HANDLER(read)
{
reply->wait = fd->fd_ops->read( fd, async, req->pos );
reply->options = fd->options;
+ async_skip_completion( async, fd->comp_flags );
release_object( async );
}
release_object( fd );
@@ -2478,6 +2480,7 @@ DECL_HANDLER(write)
{
reply->wait = fd->fd_ops->write( fd, async, req->pos );
reply->options = fd->options;
@ -96,7 +96,7 @@ index 288f6976e1..fdbd07ef59 100644
release_object( async );
}
release_object( iosb );
@@ -2507,6 +2510,7 @@ DECL_HANDLER(ioctl)
@@ -2501,6 +2504,7 @@ DECL_HANDLER(ioctl)
{
reply->wait = fd->fd_ops->ioctl( fd, req->code, async );
reply->options = fd->options;
@ -105,10 +105,10 @@ index 288f6976e1..fdbd07ef59 100644
}
release_object( iosb );
diff --git a/server/file.h b/server/file.h
index 5ea8f0f5cb..ff605c3719 100644
index 30db87e3ac7..aa70908a8a1 100644
--- a/server/file.h
+++ b/server/file.h
@@ -181,6 +181,7 @@ extern void async_set_timeout( struct async *async, timeout_t timeout, unsigned
@@ -182,6 +182,7 @@ extern void async_set_timeout( struct async *async, timeout_t timeout, unsigned
extern void async_set_result( struct object *obj, unsigned int status, apc_param_t total );
extern int async_queued( struct async_queue *queue );
extern int async_waiting( struct async_queue *queue );
@ -117,5 +117,5 @@ index 5ea8f0f5cb..ff605c3719 100644
extern void async_wake_up( struct async_queue *queue, unsigned int status );
extern struct completion *fd_get_completion( struct fd *fd, apc_param_t *p_key );
--
2.11.0
2.13.1

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "abaddc871842ba4ec0156f4bfed9939b44052ee4"
echo "3f6b7c34dbf76fdbf7561a3fe5019713b10d1c9e"
}
# Show version information
@ -6859,18 +6859,8 @@ fi
# | * dlls/propsys/propvar.c, dlls/propsys/tests/propsys.c
# |
if test "$enable_propsys_Improvements" -eq 1; then
patch_apply propsys-Improvements/0001-propsys-Add-support-for-VT_I1-and-VT_UI1-to-PropVari.patch
patch_apply propsys-Improvements/0002-propsys-Add-support-for-VT_LPWSTR-and-VT_BSTR-to-Pro.patch
patch_apply propsys-Improvements/0003-propsys-Add-support-for-VT_BSTR-to-PropVariantChange.patch
patch_apply propsys-Improvements/0004-propsys-Make-VT_FILETIME-handling-by-PropVariantChan.patch
patch_apply propsys-Improvements/0005-propsys-Add-support-for-VT_LPSTR-to-PropVariantChang.patch
patch_apply propsys-Improvements/0006-propsys-Add-support-for-VT_LPSTR-and-VT_LPWSTR-to-Pr.patch
(
printf '%s\n' '+ { "Dmitry Timoshkov", "propsys: Add support for VT_I1 and VT_UI1 to PropVariantChangeType.", 1 },';
printf '%s\n' '+ { "Dmitry Timoshkov", "propsys: Add support for VT_LPWSTR and VT_BSTR to PropVariantToStringAlloc.", 1 },';
printf '%s\n' '+ { "Dmitry Timoshkov", "propsys: Add support for VT_BSTR to PropVariantChangeType.", 1 },';
printf '%s\n' '+ { "Dmitry Timoshkov", "propsys: Make VT_FILETIME handling by PropVariantChangeType more implicit.", 1 },';
printf '%s\n' '+ { "Dmitry Timoshkov", "propsys: Add support for VT_LPSTR to PropVariantChangeType.", 2 },';
printf '%s\n' '+ { "Dmitry Timoshkov", "propsys: Add support for VT_LPSTR and VT_LPWSTR to PropVariantCompareEx.", 2 },';
) >> "$patchlist"
fi

View File

@ -1,49 +0,0 @@
From ad76cf41e0a79a75c0acb3a8aae6caa6dab9549c Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Fri, 31 Mar 2017 13:39:41 +0800
Subject: propsys: Add support for VT_I1 and VT_UI1 to PropVariantChangeType.
---
dlls/propsys/propvar.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/dlls/propsys/propvar.c b/dlls/propsys/propvar.c
index 3fee67ad276..007fd94b840 100644
--- a/dlls/propsys/propvar.c
+++ b/dlls/propsys/propvar.c
@@ -264,6 +264,32 @@ HRESULT WINAPI PropVariantChangeType(PROPVARIANT *ppropvarDest, REFPROPVARIANT p
switch (vt)
{
+ case VT_I1:
+ {
+ LONGLONG res;
+
+ hr = PROPVAR_ConvertNumber(propvarSrc, 8, TRUE, &res);
+ if (SUCCEEDED(hr))
+ {
+ ppropvarDest->vt = VT_I1;
+ ppropvarDest->u.cVal = (char)res;
+ }
+ return hr;
+ }
+
+ case VT_UI1:
+ {
+ LONGLONG res;
+
+ hr = PROPVAR_ConvertNumber(propvarSrc, 8, FALSE, &res);
+ if (SUCCEEDED(hr))
+ {
+ ppropvarDest->vt = VT_UI1;
+ ppropvarDest->u.bVal = (UCHAR)res;
+ }
+ return hr;
+ }
+
case VT_I2:
{
SHORT res;
--
2.12.2

View File

@ -1,44 +0,0 @@
From 08d1f368bb9d12d89f334a7fd34f06895b217087 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Fri, 31 Mar 2017 13:43:52 +0800
Subject: propsys: Add support for VT_LPWSTR and VT_BSTR to
PropVariantToStringAlloc.
---
dlls/propsys/propvar.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/dlls/propsys/propvar.c b/dlls/propsys/propvar.c
index 007fd94b840..a359bc724fc 100644
--- a/dlls/propsys/propvar.c
+++ b/dlls/propsys/propvar.c
@@ -224,6 +224,7 @@ HRESULT WINAPI PropVariantToStringAlloc(REFPROPVARIANT propvarIn, WCHAR **ret)
res = CoTaskMemAlloc(1*sizeof(WCHAR));
res[0] = '\0';
break;
+
case VT_LPSTR:
if(propvarIn->u.pszVal)
{
@@ -237,6 +238,18 @@ HRESULT WINAPI PropVariantToStringAlloc(REFPROPVARIANT propvarIn, WCHAR **ret)
MultiByteToWideChar(CP_ACP, 0, propvarIn->u.pszVal, -1, res, len);
}
break;
+
+ case VT_LPWSTR:
+ case VT_BSTR:
+ if (propvarIn->u.pwszVal)
+ {
+ DWORD size = (strlenW(propvarIn->u.pwszVal) + 1) * sizeof(WCHAR);
+ res = CoTaskMemAlloc(size);
+ if(!res) return E_OUTOFMEMORY;
+ memcpy(res, propvarIn->u.pwszVal, size);
+ }
+ break;
+
default:
FIXME("Unsupported conversion (%d)\n", propvarIn->vt);
hr = E_FAIL;
--
2.12.2

View File

@ -1,26 +0,0 @@
From a862cb25cefe885d4de212c21fc8a62dc8b8c682 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Fri, 31 Mar 2017 13:45:23 +0800
Subject: propsys: Add support for VT_BSTR to PropVariantChangeType.
---
dlls/propsys/propvar.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dlls/propsys/propvar.c b/dlls/propsys/propvar.c
index a359bc724fc..92399f56576 100644
--- a/dlls/propsys/propvar.c
+++ b/dlls/propsys/propvar.c
@@ -369,7 +369,9 @@ HRESULT WINAPI PropVariantChangeType(PROPVARIANT *ppropvarDest, REFPROPVARIANT p
}
return hr;
}
+
case VT_LPWSTR:
+ case VT_BSTR:
{
WCHAR *res;
hr = PropVariantToStringAlloc(propvarSrc, &res);
--
2.12.2

View File

@ -1,67 +0,0 @@
From 96f68fa277d1f8aed675d962f8cfa898b06805d7 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Sun, 7 May 2017 17:19:33 +0800
Subject: propsys: Make VT_FILETIME handling by PropVariantChangeType more
implicit.
---
dlls/propsys/propvar.c | 22 +++++++++-------------
1 file changed, 9 insertions(+), 13 deletions(-)
diff --git a/dlls/propsys/propvar.c b/dlls/propsys/propvar.c
index 92399f56576..725428ebad2 100644
--- a/dlls/propsys/propvar.c
+++ b/dlls/propsys/propvar.c
@@ -36,12 +36,11 @@
WINE_DEFAULT_DEBUG_CHANNEL(propsys);
-static HRESULT PROPVAR_ConvertFILETIME(PROPVARIANT *ppropvarDest,
- REFPROPVARIANT propvarSrc, VARTYPE vt)
+static HRESULT PROPVAR_ConvertFILETIME(const FILETIME *ft, PROPVARIANT *ppropvarDest, VARTYPE vt)
{
SYSTEMTIME time;
- FileTimeToSystemTime(&propvarSrc->u.filetime, &time);
+ FileTimeToSystemTime(ft, &time);
switch (vt)
{
@@ -272,9 +271,12 @@ HRESULT WINAPI PropVariantChangeType(PROPVARIANT *ppropvarDest, REFPROPVARIANT p
FIXME("(%p, %p, %d, %d, %d): semi-stub!\n", ppropvarDest, propvarSrc,
propvarSrc->vt, flags, vt);
- if(vt == propvarSrc->vt)
+ if (vt == propvarSrc->vt)
return PropVariantCopy(ppropvarDest, propvarSrc);
+ if (propvarSrc->vt == VT_FILETIME)
+ return PROPVAR_ConvertFILETIME(&propvarSrc->u.filetime, ppropvarDest, vt);
+
switch (vt)
{
case VT_I1:
@@ -382,17 +384,11 @@ HRESULT WINAPI PropVariantChangeType(PROPVARIANT *ppropvarDest, REFPROPVARIANT p
}
return hr;
}
- }
- switch (propvarSrc->vt)
- {
- case VT_FILETIME:
- return PROPVAR_ConvertFILETIME(ppropvarDest, propvarSrc, vt);
- default:
- FIXME("Unhandled source type: %d\n", propvarSrc->vt);
+ default:
+ FIXME("Unhandled dest type: %d\n", vt);
+ return E_FAIL;
}
-
- return E_FAIL;
}
static void PROPVAR_GUIDToWSTR(REFGUID guid, WCHAR *str)
--
2.12.2

View File

@ -1,48 +0,0 @@
From e84408e24968a947de9fcfde7605e5f200d24a01 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Sun, 7 May 2017 17:25:53 +0800
Subject: propsys: Add support for VT_LPSTR to PropVariantChangeType. (v2)
---
dlls/propsys/propvar.c | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/dlls/propsys/propvar.c b/dlls/propsys/propvar.c
index 725428ebad2..8233d2f362f 100644
--- a/dlls/propsys/propvar.c
+++ b/dlls/propsys/propvar.c
@@ -385,6 +385,31 @@ HRESULT WINAPI PropVariantChangeType(PROPVARIANT *ppropvarDest, REFPROPVARIANT p
return hr;
}
+ case VT_LPSTR:
+ {
+ WCHAR *resW;
+ hr = PropVariantToStringAlloc(propvarSrc, &resW);
+ if (SUCCEEDED(hr))
+ {
+ char *res;
+ DWORD len;
+
+ len = WideCharToMultiByte(CP_ACP, 0, resW, -1, NULL, 0, NULL, NULL);
+ res = CoTaskMemAlloc(len);
+ if (res)
+ {
+ WideCharToMultiByte(CP_ACP, 0, resW, -1, res, len, NULL, NULL);
+ ppropvarDest->vt = VT_LPSTR;
+ ppropvarDest->u.pszVal = res;
+ }
+ else
+ hr = E_OUTOFMEMORY;
+
+ CoTaskMemFree(resW);
+ }
+ return hr;
+ }
+
default:
FIXME("Unhandled dest type: %d\n", vt);
return E_FAIL;
--
2.12.2