Uniform SYS/VXD Handling 5/6: Fix crash in oldconfig
Uwe Bonnes
bon at elektron.ikp.physik.tu-darmstadt.de
Sun Jul 10 09:33:50 CDT 2005
Changelog:
Delay CDROM checking for oldconfig to avoid a crash
The checking for CDROMs in oldconfig now wants to load cdrom.sys. When done
too earlyit crashes when DIR_Windows|System is not yet initialized.
--
Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
Index: wine/dlls/kernel/oldconfig.c
===================================================================
RCS file: /home/wine/wine/dlls/kernel/oldconfig.c,v
retrieving revision 1.6
diff -u -r1.6 oldconfig.c
--- wine/dlls/kernel/oldconfig.c 29 Jun 2005 19:22:02 -0000 1.6
+++ wine/dlls/kernel/oldconfig.c 10 Jul 2005 12:54:46 -0000
@@ -112,11 +112,10 @@
HANDLE busKey;
HANDLE targetKey;
DWORD disp;
- IO_STATUS_BLOCK io;
SCSI_ADDRESS scsi_addr;
- if (NtDeviceIoControlFile( handle, 0, NULL, NULL, &io, IOCTL_SCSI_GET_ADDRESS,
- NULL, 0, &scsi_addr, sizeof(scsi_addr) ))
+ if (DeviceIoControl( handle, IOCTL_SCSI_GET_ADDRESS,
+ NULL, 0, &scsi_addr, sizeof(scsi_addr), NULL, NULL ))
return;
attr.Length = sizeof(attr);
@@ -230,7 +229,7 @@
/* create the hardware registry branch */
-static void create_hardware_branch(void)
+void create_hardware_branch(void)
{
int i;
HANDLE handle;
@@ -240,6 +239,7 @@
for (i = 2; i < 26; i++)
{
drive[4] = 'A' + i;
+ if(GetDriveTypeA(&drive[4]) != DRIVE_CDROM) continue;
handle = CreateFileA( drive, 0, 0, NULL, OPEN_EXISTING, 0, 0 );
if (handle == INVALID_HANDLE_VALUE) continue;
init_cdrom_registry( handle );
@@ -267,9 +267,6 @@
wine_server_call( req );
}
SERVER_END_REQ;
-
- /* create some hardware keys (FIXME: should not be done here) */
- create_hardware_branch();
NtClose( hkey_current_user );
}
Index: wine/dlls/kernel/process.c
===================================================================
RCS file: /home/wine/wine/dlls/kernel/process.c,v
retrieving revision 1.92
diff -u -r1.92 process.c
--- wine/dlls/kernel/process.c 27 Jun 2005 11:12:11 -0000 1.92
+++ wine/dlls/kernel/process.c 10 Jul 2005 12:54:52 -0000
@@ -1011,6 +1011,9 @@
init_windows_dirs();
init_current_directory( ¶ms->CurrentDirectory );
+ /* oldconfig: create some hardware keys (FIXME: should not be done here) */
+ create_hardware_branch();
+
return TRUE;
}
Index: wine/dlls/kernel/kernel_private.h
===================================================================
RCS file: /home/wine/wine/dlls/kernel/kernel_private.h,v
retrieving revision 1.25
diff -u -r1.25 kernel_private.h
--- wine/dlls/kernel/kernel_private.h 14 Jun 2005 11:42:34 -0000 1.25
+++ wine/dlls/kernel/kernel_private.h 10 Jul 2005 12:54:52 -0000
@@ -131,6 +131,7 @@
/* oldconfig.c */
extern void convert_old_config(void);
+extern void create_hardware_branch(void);
extern struct winedos_exports
{
More information about the wine-patches
mailing list