Added patch to return fake device type when systemroot is located on virtual disk.

This commit is contained in:
Sebastian Lackner 2015-05-29 20:00:17 +02:00
parent 1b2fa6c6cb
commit cec272a2d4
5 changed files with 127 additions and 50 deletions

View File

@ -39,7 +39,7 @@ Wine. All those differences are also documented on the
Included bug fixes and improvements
-----------------------------------
**Bug fixes and features included in the next upcoming release [9]:**
**Bug fixes and features included in the next upcoming release [10]:**
* Add shell32 placeholder icons to match offsets with Windows ([Wine Bug #30185](https://bugs.winehq.org/show_bug.cgi?id=30185))
* Add stub for iphlpapi.ConvertInterfaceLuidToGuid ([Wine Bug #38576](https://bugs.winehq.org/show_bug.cgi?id=38576))
@ -48,6 +48,7 @@ Included bug fixes and improvements
* Also handle '\r' as whitespace in wbemprox queries
* Assign a drive serial number during prefix creation/update ([Wine Bug #17823](https://bugs.winehq.org/show_bug.cgi?id=17823))
* Fix crash in Gothic 1/2 with builtin directmusic caused by wrong return value ([Wine Bug #7425](https://bugs.winehq.org/show_bug.cgi?id=7425))
* Return fake device type when systemroot is located on virtual disk ([Wine Bug #36546](https://bugs.winehq.org/show_bug.cgi?id=36546))
* Support for ws2_32.dll.WSAPoll ([Wine Bug #38601](https://bugs.winehq.org/show_bug.cgi?id=38601))
* Use random names when caching very long urls in wininet

2
debian/changelog vendored
View File

@ -10,6 +10,8 @@ wine-staging (1.7.44) UNRELEASED; urgency=low
Staging Bug #266).
* Added patch to fix crash in Gothic 1/2 with builtin directmusic caused by
wrong return value.
* Added patch to return fake device type when systemroot is located on virtual
disk (improves compatibility when wineprefix is on tmpfs).
* Removed patch to reset device state in SysKeyboard*Impl_Acquire (accepted
upstream).
* Removed patch to avoid creating thread queues for foreign threads in

View File

@ -0,0 +1,54 @@
From 28b58832717d9c6a8032a555b0fb1035ac9fd710 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Fri, 29 May 2015 19:57:22 +0200
Subject: ntdll: Return fake device type when systemroot is located on virtual
disk.
---
dlls/ntdll/file.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index d081750..45b61fb 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -3126,9 +3126,36 @@ NTSTATUS WINAPI NtQueryVolumeInformationFile( HANDLE handle, PIO_STATUS_BLOCK io
else
{
FILE_FS_DEVICE_INFORMATION *info = buffer;
+ ANSI_STRING unix_name;
if ((io->u.Status = get_device_info( fd, info )) == STATUS_SUCCESS)
+ {
io->Information = sizeof(*info);
+
+ /* Some MSI installers complain when the SystemRoot is located
+ * on a virtual disk. Fake return values for compatibility. */
+ if (info->DeviceType == FILE_DEVICE_VIRTUAL_DISK &&
+ user_shared_data->NtSystemRoot[1] == ':' &&
+ !server_get_unix_name( handle, &unix_name ))
+ {
+ UNICODE_STRING nt_name;
+ if (!wine_unix_to_nt_file_name( &unix_name, &nt_name ))
+ {
+ WCHAR *buf = nt_name.Buffer;
+ if (nt_name.Length >= 6 * sizeof(WCHAR) &&
+ buf[0] == '\\' && buf[1] == '?' && buf[2] == '?' && buf[3] == '\\' &&
+ buf[4] == user_shared_data->NtSystemRoot[0] && buf[5] == ':')
+ {
+ WARN( "returning fake disk type for %s\n",
+ debugstr_wn(buf, nt_name.Length/sizeof(WCHAR)) );
+ info->DeviceType = FILE_DEVICE_DISK_FILE_SYSTEM;
+ }
+ RtlFreeUnicodeString( &nt_name );
+ }
+ RtlFreeAnsiString( &unix_name );
+ }
+
+ }
}
break;
case FileFsAttributeInformation:
--
2.4.2

View File

@ -0,0 +1 @@
Fixes: [36546] Return fake device type when systemroot is located on virtual disk

View File

@ -160,6 +160,7 @@ patch_enable_all ()
enable_ntdll_CLI_Images="$1"
enable_ntdll_DOS_Attributes="$1"
enable_ntdll_DVD_Read_Size="$1"
enable_ntdll_DeviceType_Systemroot="$1"
enable_ntdll_DllRedirects="$1"
enable_ntdll_Exception="$1"
enable_ntdll_FileDispositionInformation="$1"
@ -542,6 +543,9 @@ patch_enable ()
ntdll-DVD_Read_Size)
enable_ntdll_DVD_Read_Size="$2"
;;
ntdll-DeviceType_Systemroot)
enable_ntdll_DeviceType_Systemroot="$2"
;;
ntdll-DllRedirects)
enable_ntdll_DllRedirects="$2"
;;
@ -1756,13 +1760,6 @@ if test "$enable_kernel32_CopyFileEx" -eq 1; then
enable_ntdll_FileDispositionInformation=1
fi
if test "$enable_ntdll_FileDispositionInformation" -eq 1; then
if test "$enable_server_File_Permissions" -gt 1; then
abort "Patchset server-File_Permissions disabled, but ntdll-FileDispositionInformation depends on that."
fi
enable_server_File_Permissions=1
fi
if test "$enable_kernel32_SetFileInformationByHandle" -eq 1; then
if test "$enable_kernel32_SetFileCompletionNotificationMode" -gt 1; then
abort "Patchset kernel32-SetFileCompletionNotificationMode disabled, but kernel32-SetFileInformationByHandle depends on that."
@ -1770,6 +1767,13 @@ if test "$enable_kernel32_SetFileInformationByHandle" -eq 1; then
enable_kernel32_SetFileCompletionNotificationMode=1
fi
if test "$enable_ntdll_FileDispositionInformation" -eq 1; then
if test "$enable_server_File_Permissions" -gt 1; then
abort "Patchset server-File_Permissions disabled, but ntdll-FileDispositionInformation depends on that."
fi
enable_server_File_Permissions=1
fi
if test "$enable_dxva2_Video_Decoder" -eq 1; then
if test "$enable_winecfg_Staging" -gt 1; then
abort "Patchset winecfg-Staging disabled, but dxva2-Video_Decoder depends on that."
@ -2641,6 +2645,18 @@ if test "$enable_dxgi_GetDesc" -eq 1; then
) >> "$patchlist"
fi
# Patchset makedep-PARENTSPEC
# |
# | Modified files:
# | * tools/makedep.c
# |
if test "$enable_makedep_PARENTSPEC" -eq 1; then
patch_apply makedep-PARENTSPEC/0001-makedep-Add-support-for-PARENTSPEC-Makefile-variable.patch
(
echo '+ { "Sebastian Lackner", "makedep: Add support for PARENTSPEC Makefile variable.", 1 },';
) >> "$patchlist"
fi
# Patchset ntdll-DllRedirects
# |
# | Modified files:
@ -2661,18 +2677,6 @@ if test "$enable_ntdll_DllRedirects" -eq 1; then
) >> "$patchlist"
fi
# Patchset makedep-PARENTSPEC
# |
# | Modified files:
# | * tools/makedep.c
# |
if test "$enable_makedep_PARENTSPEC" -eq 1; then
patch_apply makedep-PARENTSPEC/0001-makedep-Add-support-for-PARENTSPEC-Makefile-variable.patch
(
echo '+ { "Sebastian Lackner", "makedep: Add support for PARENTSPEC Makefile variable.", 1 },';
) >> "$patchlist"
fi
# Patchset wined3d-CSMT_Helper
# |
# | Modified files:
@ -3395,36 +3399,6 @@ if test "$enable_kernel32_CompareStringEx" -eq 1; then
) >> "$patchlist"
fi
# Patchset kernel32-SetFileCompletionNotificationMode
# |
# | This patchset fixes the following Wine bugs:
# | * [#38493] Add stub for kernel32.SetFileCompletionNotificationModes (for Steam in Win7 mode)
# |
# | Modified files:
# | * dlls/api-ms-win-core-kernel32-legacy-l1-1-0/api-ms-win-core-kernel32-legacy-l1-1-0.spec, dlls/kernel32/file.c,
# | dlls/kernel32/kernel32.spec, include/winbase.h
# |
if test "$enable_kernel32_SetFileCompletionNotificationMode" -eq 1; then
patch_apply kernel32-SetFileCompletionNotificationMode/0001-kernel32-Implement-SetFileCompletionNotificationMode.patch
(
echo '+ { "Olivier F. R. Dierick", "kernel32: Implement SetFileCompletionNotificationModes as a stub.", 1 },';
) >> "$patchlist"
fi
# Patchset kernel32-SetFileInformationByHandle
# |
# | Modified files:
# | * dlls/kernel32/file.c, include/winbase.h
# |
if test "$enable_kernel32_SetFileInformationByHandle" -eq 1; then
patch_apply kernel32-SetFileInformationByHandle/0001-include-Declare-a-couple-more-file-information-class.patch
patch_apply kernel32-SetFileInformationByHandle/0002-kernel32-Implement-SetFileInformationByHandle.patch
(
echo '+ { "Michael Müller", "include: Declare a couple more file information class structures.", 1 },';
echo '+ { "Michael Müller", "kernel32: Implement SetFileInformationByHandle.", 1 },';
) >> "$patchlist"
fi
# Patchset server-File_Permissions
# |
# | Modified files:
@ -3466,6 +3440,36 @@ if test "$enable_ntdll_FileDispositionInformation" -eq 1; then
) >> "$patchlist"
fi
# Patchset kernel32-SetFileCompletionNotificationMode
# |
# | This patchset fixes the following Wine bugs:
# | * [#38493] Add stub for kernel32.SetFileCompletionNotificationModes (for Steam in Win7 mode)
# |
# | Modified files:
# | * dlls/api-ms-win-core-kernel32-legacy-l1-1-0/api-ms-win-core-kernel32-legacy-l1-1-0.spec, dlls/kernel32/file.c,
# | dlls/kernel32/kernel32.spec, include/winbase.h
# |
if test "$enable_kernel32_SetFileCompletionNotificationMode" -eq 1; then
patch_apply kernel32-SetFileCompletionNotificationMode/0001-kernel32-Implement-SetFileCompletionNotificationMode.patch
(
echo '+ { "Olivier F. R. Dierick", "kernel32: Implement SetFileCompletionNotificationModes as a stub.", 1 },';
) >> "$patchlist"
fi
# Patchset kernel32-SetFileInformationByHandle
# |
# | Modified files:
# | * dlls/kernel32/file.c, include/winbase.h
# |
if test "$enable_kernel32_SetFileInformationByHandle" -eq 1; then
patch_apply kernel32-SetFileInformationByHandle/0001-include-Declare-a-couple-more-file-information-class.patch
patch_apply kernel32-SetFileInformationByHandle/0002-kernel32-Implement-SetFileInformationByHandle.patch
(
echo '+ { "Michael Müller", "include: Declare a couple more file information class structures.", 1 },';
echo '+ { "Michael Müller", "kernel32: Implement SetFileInformationByHandle.", 1 },';
) >> "$patchlist"
fi
# Patchset kernel32-CopyFileEx
# |
# | This patchset fixes the following Wine bugs:
@ -3905,6 +3909,21 @@ if test "$enable_ntdll_DVD_Read_Size" -eq 1; then
) >> "$patchlist"
fi
# Patchset ntdll-DeviceType_Systemroot
# |
# | This patchset fixes the following Wine bugs:
# | * [#36546] Return fake device type when systemroot is located on virtual disk
# |
# | Modified files:
# | * dlls/ntdll/file.c
# |
if test "$enable_ntdll_DeviceType_Systemroot" -eq 1; then
patch_apply ntdll-DeviceType_Systemroot/0001-ntdll-Return-fake-device-type-when-systemroot-is-loc.patch
(
echo '+ { "Sebastian Lackner", "ntdll: Return fake device type when systemroot is located on virtual disk.", 1 },';
) >> "$patchlist"
fi
# Patchset ntdll-Exception
# |
# | Modified files: