ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
December 2007
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
22 participants
605 discussions
Start a n
N
ew thread
[gedmurphy] 31290: update header
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Mon Dec 17 12:41:33 2007 New Revision: 31290 URL:
http://svn.reactos.org/svn/reactos?rev=31290&view=rev
Log: update header Modified: trunk/reactos/include/reactos/win32k/ntuser.h Modified: trunk/reactos/include/reactos/win32k/ntuser.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntu…
============================================================================== --- trunk/reactos/include/reactos/win32k/ntuser.h (original) +++ trunk/reactos/include/reactos/win32k/ntuser.h Mon Dec 17 12:41:33 2007 @@ -638,6 +638,7 @@ #define ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING 0x0d #define ONEPARAM_ROUTINE_GETDESKTOPMAPPING 0x0e #define ONEPARAM_ROUTINE_GETWINDOWINSTANCE 0x10 +#define ONEPARAM_ROUTINE_CREATECURICONHANDLE 0x25 #define ONEPARAM_ROUTINE_MSQSETWAKEMASK 0x27 #define ONEPARAM_ROUTINE_GETKEYBOARDTYPE 0x28 #define ONEPARAM_ROUTINE_GETKEYBOARDLAYOUT 0x29 @@ -1222,7 +1223,7 @@ NTAPI NtUserGetIconSize( HANDLE Handle, - DWORD Unknown, + UINT istepIfAniCur, LONG *plcx, LONG *plcy);
17 years
1
0
0
0
[gedmurphy] 31289: - Add a new routine to NtUSerCallOneParam which returns newly created handles for icons and cursors - Fix the NtUserGetIconSize prototype
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Mon Dec 17 12:40:48 2007 New Revision: 31289 URL:
http://svn.reactos.org/svn/reactos?rev=31289&view=rev
Log: - Add a new routine to NtUSerCallOneParam which returns newly created handles for icons and cursors - Fix the NtUserGetIconSize prototype Modified: trunk/reactos/subsystems/win32/win32k/ntuser/cursoricon.c trunk/reactos/subsystems/win32/win32k/ntuser/misc.c Modified: trunk/reactos/subsystems/win32/win32k/ntuser/cursoricon.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/cursoricon.c (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/cursoricon.c Mon Dec 17 12:40:48 2007 @@ -676,9 +676,6 @@ } -/* for hints how the prototype might be, see -
http://forum.grafika.cz/read.php?23,1816012,1816139,quote=1
-
http://www.cyber-ta.org/releases/malware-analysis/public/SOURCES/b47155634c…
*/ /* * @implemented */ @@ -686,7 +683,7 @@ NTAPI NtUserGetIconSize( HANDLE hCurIcon, - DWORD dwUnknown2, // Most of the time Zero. + UINT istepIfAniCur, PLONG plcx, // &size.cx PLONG plcy) // &size.cy { Modified: trunk/reactos/subsystems/win32/win32k/ntuser/misc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/misc.c (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/misc.c Mon Dec 17 12:40:48 2007 @@ -352,6 +352,28 @@ case ONEPARAM_ROUTINE_SETMESSAGEEXTRAINFO: RETURN( (DWORD)MsqSetMessageExtraInfo((LPARAM)Param)); + + case ONEPARAM_ROUTINE_CREATECURICONHANDLE: + { + PCURICON_OBJECT CurIcon; + PWINSTATION_OBJECT WinSta; + + WinSta = IntGetWinStaObj(); + if(WinSta == NULL) + { + RETURN(0); + } + + if (!(CurIcon = IntCreateCurIconHandle(WinSta))) + { + SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY); + ObDereferenceObject(WinSta); + RETURN(0); + } + + ObDereferenceObject(WinSta); + RETURN((DWORD)CurIcon->Self); + } case ONEPARAM_ROUTINE_GETCURSORPOSITION: {
17 years
1
0
0
0
[dreimer] 31288: Updated German Input.cpl Resource.
by dreimer@svn.reactos.org
Author: dreimer Date: Mon Dec 17 12:06:07 2007 New Revision: 31288 URL:
http://svn.reactos.org/svn/reactos?rev=31288&view=rev
Log: Updated German Input.cpl Resource. Modified: trunk/reactos/dll/cpl/input/lang/de-DE.rc Modified: trunk/reactos/dll/cpl/input/lang/de-DE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/lang/de-DE.r…
============================================================================== --- trunk/reactos/dll/cpl/input/lang/de-DE.rc (original) +++ trunk/reactos/dll/cpl/input/lang/de-DE.rc Mon Dec 17 12:06:07 2007 @@ -233,15 +233,15 @@ BEGIN IDS_CPLSYSTEMNAME "Textdienste und Eingabesprachen" IDS_CPLSYSTEMDESCRIPTION "Ändert die Einstellungen der Texteingabe einer Sprache." - IDS_KEYBOARD "Keyboard" - IDS_ADV_TEXT_SRV "Advanced Text Services" - IDS_NONE "(None)" - IDS_UNKNOWN "(Unknown)" - IDS_RESTART "Do you want to restart your computer now?" - IDS_SPEECH "Speech" - IDS_HRD_REC "Handwriting Recognition" - IDS_OFF_ADV_TXT_SRV "Do you want to turn off advanced text services?" - IDS_WHATS_THIS "What's This?" + IDS_KEYBOARD "Tastatur" + IDS_ADV_TEXT_SRV "Erweiterte Textdienste" + IDS_NONE "(Keine)" + IDS_UNKNOWN "(Unbekannt)" + IDS_RESTART "Wollen Sie Ihren Computer nun neustarten?" + IDS_SPEECH "Sprache" + IDS_HRD_REC "Handschrifterkennung" + IDS_OFF_ADV_TXT_SRV "Wollen Sie die erweiterten Textdienste ausschalten?" + IDS_WHATS_THIS "Was ist das?" END STRINGTABLE
17 years
1
0
0
0
[hpoussin] 31287: Use kernel facilities to change debug level at runtime
by hpoussin@svn.reactos.org
Author: hpoussin Date: Mon Dec 17 00:12:54 2007 New Revision: 31287 URL:
http://svn.reactos.org/svn/reactos?rev=31287&view=rev
Log: Use kernel facilities to change debug level at runtime Modified: trunk/reactos/drivers/input/i8042prt/createclose.c trunk/reactos/drivers/input/i8042prt/i8042prt.c trunk/reactos/drivers/input/i8042prt/keyboard.c trunk/reactos/drivers/input/i8042prt/misc.c trunk/reactos/drivers/input/i8042prt/mouse.c trunk/reactos/drivers/input/i8042prt/pnp.c trunk/reactos/drivers/input/i8042prt/ps2pp.c trunk/reactos/drivers/input/i8042prt/readwrite.c trunk/reactos/drivers/input/i8042prt/registry.c trunk/reactos/drivers/input/i8042prt/setup.c Modified: trunk/reactos/drivers/input/i8042prt/createclose.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/input/i8042prt/cre…
============================================================================== --- trunk/reactos/drivers/input/i8042prt/createclose.c (original) +++ trunk/reactos/drivers/input/i8042prt/createclose.c Mon Dec 17 00:12:54 2007 @@ -17,7 +17,7 @@ IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { - DPRINT("IRP_MJ_CREATE\n"); + TRACE_(I8042PRT, "IRP_MJ_CREATE\n"); Irp->IoStatus.Status = STATUS_SUCCESS; Irp->IoStatus.Information = 0; @@ -30,7 +30,7 @@ IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { - DPRINT("IRP_MJ_CLEANUP\n"); + TRACE_(I8042PRT, "IRP_MJ_CLEANUP\n"); Irp->IoStatus.Status = STATUS_SUCCESS; Irp->IoStatus.Information = 0; @@ -43,7 +43,7 @@ IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { - DPRINT("IRP_MJ_CLOSE\n"); + TRACE_(I8042PRT, "IRP_MJ_CLOSE\n"); Irp->IoStatus.Status = STATUS_SUCCESS; Irp->IoStatus.Information = 0; Modified: trunk/reactos/drivers/input/i8042prt/i8042prt.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/input/i8042prt/i80…
============================================================================== --- trunk/reactos/drivers/input/i8042prt/i8042prt.c (original) +++ trunk/reactos/drivers/input/i8042prt/i8042prt.c Mon Dec 17 00:12:54 2007 @@ -33,7 +33,7 @@ ULONG DeviceExtensionSize; NTSTATUS Status; - DPRINT("i8042AddDevice(%p %p)\n", DriverObject, Pdo); + TRACE_(I8042PRT, "i8042AddDevice(%p %p)\n", DriverObject, Pdo); DriverExtension = (PI8042_DRIVER_EXTENSION)IoGetDriverObjectExtension(DriverObject, DriverObject); @@ -57,7 +57,7 @@ &Fdo); if (!NT_SUCCESS(Status)) { - DPRINT("IoCreateDevice() failed with status 0x%08lx\n", Status); + WARN_(I8042PRT, "IoCreateDevice() failed with status 0x%08lx\n", Status); goto cleanup; } @@ -70,7 +70,7 @@ Status = IoAttachDeviceToDeviceStackSafe(Fdo, Pdo, &DeviceExtension->LowerDevice); if (!NT_SUCCESS(Status)) { - DPRINT("IoAttachDeviceToDeviceStackSafe() failed with status 0x%08lx\n", Status); + WARN_(I8042PRT, "IoAttachDeviceToDeviceStackSafe() failed with status 0x%08lx\n", Status); goto cleanup; } @@ -107,7 +107,7 @@ PIRP NewIrp; NTSTATUS Status; - DPRINT("i8042SendHookWorkItem(%p %p)\n", DeviceObject, Context); + TRACE_(I8042PRT, "i8042SendHookWorkItem(%p %p)\n", DeviceObject, Context); WorkItemData = (PI8042_HOOK_WORKITEM)Context; FdoDeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension; @@ -135,7 +135,7 @@ } default: { - DPRINT1("Unknown FDO type %u\n", FdoDeviceExtension->Type); + ERR_(I8042PRT, "Unknown FDO type %u\n", FdoDeviceExtension->Type); ASSERT(FALSE); WorkItemData->Irp->IoStatus.Status = STATUS_INTERNAL_ERROR; goto cleanup; @@ -158,7 +158,7 @@ if (!NewIrp) { - DPRINT("IoBuildDeviceIoControlRequest() failed\n"); + WARN_(I8042PRT, "IoBuildDeviceIoControlRequest() failed\n"); WorkItemData->Irp->IoStatus.Status = STATUS_INSUFFICIENT_RESOURCES; goto cleanup; } @@ -176,7 +176,7 @@ } if (!NT_SUCCESS(Status)) { - DPRINT("IoCallDriver() failed with status 0x%08lx\n", Status); + WARN_(I8042PRT, "IoCallDriver() failed with status 0x%08lx\n", Status); goto cleanup; } @@ -196,7 +196,7 @@ FALSE); if (!NT_SUCCESS(Status)) { - DPRINT("KeyboardHook.InitializationRoutine() failed with status 0x%08lx\n", Status); + WARN_(I8042PRT, "KeyboardHook.InitializationRoutine() failed with status 0x%08lx\n", Status); WorkItemData->Irp->IoStatus.Status = Status; goto cleanup; } @@ -229,7 +229,7 @@ i8042KbdStartIo(DeviceObject, Irp); break; default: - DPRINT1("Unknown FDO type %u\n", DeviceExtension->Type); + ERR_(I8042PRT, "Unknown FDO type %u\n", DeviceExtension->Type); ASSERT(FALSE); break; } @@ -251,7 +251,7 @@ Port)) { /* something is really wrong! */ - DPRINT1("Failed to send packet byte!\n"); + WARN_(I8042PRT, "Failed to send packet byte!\n"); return FALSE; } } @@ -343,7 +343,7 @@ case Keyboard: DeviceExtension->PacketPort = 0; break; case Mouse: DeviceExtension->PacketPort = CTRL_WRITE_MOUSE; break; default: - DPRINT1("Unknown FDO type %u\n", FdoDeviceExtension->Type); + ERR_(I8042PRT, "Unknown FDO type %u\n", FdoDeviceExtension->Type); ASSERT(FALSE); Status = STATUS_INTERNAL_ERROR; goto done; @@ -401,7 +401,7 @@ PFDO_DEVICE_EXTENSION DeviceExtension; NTSTATUS Status; - DPRINT("i8042DeviceControl(%p %p)\n", DeviceObject, Irp); + TRACE_(I8042PRT, "i8042DeviceControl(%p %p)\n", DeviceObject, Irp); DeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension; switch (DeviceExtension->Type) @@ -425,7 +425,7 @@ ULONG ControlCode; NTSTATUS Status; - DPRINT("i8042InternalDeviceControl(%p %p)\n", DeviceObject, Irp); + TRACE_(I8042PRT, "i8042InternalDeviceControl(%p %p)\n", DeviceObject, Irp); DeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension; switch (DeviceExtension->Type) @@ -442,7 +442,7 @@ Status = i8042MouInternalDeviceControl(DeviceObject, Irp); break; default: - DPRINT1("Unknown IO control code 0x%lx\n", ControlCode); + ERR_(I8042PRT, "Unknown IO control code 0x%lx\n", ControlCode); ASSERT(FALSE); Status = STATUS_INVALID_DEVICE_REQUEST; break; @@ -456,7 +456,7 @@ Status = i8042MouInternalDeviceControl(DeviceObject, Irp); break; default: - DPRINT1("Unknown FDO type %u\n", DeviceExtension->Type); + ERR_(I8042PRT, "Unknown FDO type %u\n", DeviceExtension->Type); ASSERT(FALSE); Status = STATUS_INTERNAL_ERROR; IoCompleteRequest(Irp, IO_NO_INCREMENT); @@ -482,7 +482,7 @@ (PVOID*)&DriverExtension); if (!NT_SUCCESS(Status)) { - DPRINT("IoAllocateDriverObjectExtension() failed with status 0x%08lx\n", Status); + WARN_(I8042PRT, "IoAllocateDriverObjectExtension() failed with status 0x%08lx\n", Status); return Status; } RtlZeroMemory(DriverExtension, sizeof(I8042_DRIVER_EXTENSION)); @@ -496,14 +496,14 @@ &DriverExtension->RegistryPath); if (!NT_SUCCESS(Status)) { - DPRINT("DuplicateUnicodeString() failed with status 0x%08lx\n", Status); + WARN_(I8042PRT, "DuplicateUnicodeString() failed with status 0x%08lx\n", Status); return Status; } Status = ReadRegistryEntries(RegistryPath, &DriverExtension->Port.Settings); if (!NT_SUCCESS(Status)) { - DPRINT("ReadRegistryEntries() failed with status 0x%08lx\n", Status); + WARN_(I8042PRT, "ReadRegistryEntries() failed with status 0x%08lx\n", Status); return Status; } @@ -523,5 +523,13 @@ if (IsFirstStageSetup()) return i8042AddLegacyKeyboard(DriverObject, RegistryPath); + /* ROS Hack: ideally, we shouldn't have to initialize debug level this way */ +#ifndef NDEBUG + DbgSetDebugFilterState( + DPFLTR_I8042PRT_ID, + DPFLTR_ERROR_LEVEL | DPFLTR_WARNING_LEVEL | DPFLTR_TRACE_LEVEL | DPFLTR_INFO_LEVEL, + TRUE); +#endif + return STATUS_SUCCESS; } Modified: trunk/reactos/drivers/input/i8042prt/keyboard.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/input/i8042prt/key…
============================================================================== --- trunk/reactos/drivers/input/i8042prt/keyboard.c (original) +++ trunk/reactos/drivers/input/i8042prt/keyboard.c Mon Dec 17 00:12:54 2007 @@ -39,7 +39,7 @@ IN PDEVICE_OBJECT DeviceObject, IN PVOID Key) { - DPRINT("Debug key: %p\n", Key); + INFO_(I8042PRT, "Debug key: p\n", Key); if (!Key) return; @@ -85,11 +85,11 @@ DeviceExtension->KeysInBuffer++; if (DeviceExtension->KeysInBuffer > DeviceExtension->Common.PortDeviceExtension->Settings.KeyboardDataQueueSize) { - DPRINT1("Keyboard buffer overflow\n"); + WARN_(I8042PRT, "Keyboard buffer overflow\n"); DeviceExtension->KeysInBuffer--; } - DPRINT("Irq completes key\n"); + TRACE_(I8042PRT, "Irq completes key\n"); KeInsertQueueDpc(&DeviceExtension->DpcKeyboard, NULL, NULL); } @@ -130,7 +130,7 @@ { case IOCTL_KEYBOARD_SET_INDICATORS: { - DPRINT("IOCTL_KEYBOARD_SET_INDICATORS\n"); + TRACE_(I8042PRT, "IOCTL_KEYBOARD_SET_INDICATORS\n"); PortDeviceExtension->PacketBuffer[0] = KBD_CMD_SET_LEDS; PortDeviceExtension->PacketBuffer[1] = 0; @@ -153,7 +153,7 @@ } default: { - DPRINT("Unknown ioctl code 0x%lx\n", + ERR_(I8042PRT, "Unknown ioctl code 0x%lx\n", Stack->Parameters.DeviceIoControl.IoControlCode); ASSERT(FALSE); } @@ -234,7 +234,7 @@ if (!NT_SUCCESS(Status)) { /* We can't do more yet, ignore the keypress... */ - DPRINT("IoRegisterDeviceInterface(GUID_DEVICE_SYS_BUTTON) failed with status 0x%08lx\n", + WARN_(I8042PRT, "IoRegisterDeviceInterface(GUID_DEVICE_SYS_BUTTON) failed with status 0x%08lx\n", Status); DeviceExtension->PowerInterfaceName.MaximumLength = 0; return; @@ -249,7 +249,7 @@ if (!NT_SUCCESS(Status)) { /* Ignore the key press... */ - DPRINT("Disabling interface %wZ failed with status 0x%08lx\n", + WARN_(I8042PRT, "Disabling interface %wZ failed with status 0x%08lx\n", &DeviceExtension->PowerInterfaceName, Status); return; } @@ -262,7 +262,7 @@ if (!NT_SUCCESS(Status)) { /* Ignore the key press... */ - DPRINT("Enabling interface %wZ failed with status 0x%08lx\n", + WARN_(I8042PRT, "Enabling interface %wZ failed with status 0x%08lx\n", &DeviceExtension->PowerInterfaceName, Status); return; } @@ -379,12 +379,12 @@ } } - DPRINT("Send a key\n"); + TRACE_(I8042PRT, "Send a key\n"); if (!DeviceExtension->KeyboardData.ClassService) return; - DPRINT("Sending %lu key(s)\n", KeysInBufferCopy); + INFO_(I8042PRT, "Sending %lu key(s)\n", KeysInBufferCopy); (*(PSERVICE_CALLBACK_ROUTINE)DeviceExtension->KeyboardData.ClassService)( DeviceExtension->KeyboardData.ClassDeviceObject, DeviceExtension->KeyboardBuffer, @@ -418,7 +418,7 @@ { /* Part of GUID_DEVICE_SYS_BUTTON interface */ PULONG pCaps; - DPRINT("IOCTL_GET_SYS_BUTTON_CAPS\n"); + TRACE_(I8042PRT, "IOCTL_GET_SYS_BUTTON_CAPS\n"); if (Stack->Parameters.DeviceIoControl.OutputBufferLength != sizeof(ULONG)) Status = STATUS_INVALID_PARAMETER; @@ -436,7 +436,7 @@ { /* Part of GUID_DEVICE_SYS_BUTTON interface */ PIRP WaitingIrp; - DPRINT("IOCTL_GET_SYS_BUTTON_EVENT\n"); + TRACE_(I8042PRT, "IOCTL_GET_SYS_BUTTON_EVENT\n"); if (Stack->Parameters.DeviceIoControl.OutputBufferLength != sizeof(ULONG)) Status = STATUS_INVALID_PARAMETER; @@ -450,7 +450,7 @@ if (WaitingIrp) { /* Unable to have a 2nd pending IRP for this IOCTL */ - DPRINT1("Unable to pend a second IRP for IOCTL_GET_SYS_BUTTON_EVENT\n"); + WARN_(I8042PRT, "Unable to pend a second IRP for IOCTL_GET_SYS_BUTTON_EVENT\n"); Status = STATUS_INVALID_PARAMETER; Irp->IoStatus.Status = Status; IoCompleteRequest(Irp, IO_NO_INCREMENT); @@ -470,7 +470,7 @@ } else { - DPRINT("Pending IOCTL_GET_SYS_BUTTON_EVENT\n"); + TRACE_(I8042PRT, "Pending IOCTL_GET_SYS_BUTTON_EVENT\n"); Status = STATUS_PENDING; Irp->IoStatus.Status = Status; IoMarkIrpPending(Irp); @@ -482,7 +482,7 @@ } default: { - DPRINT("IRP_MJ_DEVICE_CONTROL / unknown ioctl code 0x%lx\n", + ERR_(I8042PRT, "IRP_MJ_DEVICE_CONTROL / unknown ioctl code 0x%lx\n", Stack->Parameters.DeviceIoControl.IoControlCode); ASSERT(FALSE); return ForwardIrpAndForget(DeviceObject, Irp); @@ -522,7 +522,7 @@ PIO_WORKITEM WorkItem = NULL; PI8042_HOOK_WORKITEM WorkItemData = NULL; - DPRINT("IRP_MJ_INTERNAL_DEVICE_CONTROL / IOCTL_INTERNAL_KEYBOARD_CONNECT\n"); + TRACE_(I8042PRT, "IRP_MJ_INTERNAL_DEVICE_CONTROL / IOCTL_INTERNAL_KEYBOARD_CONNECT\n"); if (Stack->Parameters.DeviceIoControl.InputBufferLength != sizeof(CONNECT_DATA)) { Status = STATUS_INVALID_PARAMETER; @@ -536,7 +536,7 @@ WorkItem = IoAllocateWorkItem(DeviceObject); if (!WorkItem) { - DPRINT("IoAllocateWorkItem() failed\n"); + WARN_(I8042PRT, "IoAllocateWorkItem() failed\n"); Status = STATUS_INSUFFICIENT_RESOURCES; goto cleanup; } @@ -546,7 +546,7 @@ I8042PRT_TAG); if (!WorkItemData) { - DPRINT("ExAllocatePoolWithTag() failed\n"); + WARN_(I8042PRT, "ExAllocatePoolWithTag() failed\n"); Status = STATUS_NO_MEMORY; goto cleanup; } @@ -562,7 +562,7 @@ I8042PRT_TAG); if (!DeviceExtension->KeyboardBuffer) { - DPRINT("ExAllocatePoolWithTag() failed\n"); + WARN_(I8042PRT, "ExAllocatePoolWithTag() failed\n"); Status = STATUS_NO_MEMORY; goto cleanup; } @@ -574,14 +574,14 @@ DeviceExtension->PowerWorkItem = IoAllocateWorkItem(DeviceObject); if (!DeviceExtension->PowerWorkItem) { - DPRINT("IoAllocateWorkItem() failed\n"); + WARN_(I8042PRT, "IoAllocateWorkItem() failed\n"); Status = STATUS_INSUFFICIENT_RESOURCES; goto cleanup; } DeviceExtension->DebugWorkItem = IoAllocateWorkItem(DeviceObject); if (!DeviceExtension->DebugWorkItem) { - DPRINT("IoAllocateWorkItem() failed\n"); + WARN_(I8042PRT, "IoAllocateWorkItem() failed\n"); Status = STATUS_INSUFFICIENT_RESOURCES; goto cleanup; } @@ -614,7 +614,7 @@ } case IOCTL_INTERNAL_KEYBOARD_DISCONNECT: { - DPRINT("IRP_MJ_INTERNAL_DEVICE_CONTROL / IOCTL_INTERNAL_KEYBOARD_DISCONNECT\n"); + TRACE_(I8042PRT, "IRP_MJ_INTERNAL_DEVICE_CONTROL / IOCTL_INTERNAL_KEYBOARD_DISCONNECT\n"); /* MSDN says that operation is to implemented. * To implement it, we just have to do: * DeviceExtension->KeyboardData.ClassService = NULL; @@ -624,14 +624,14 @@ } case IOCTL_INTERNAL_I8042_HOOK_KEYBOARD: { - DPRINT("IRP_MJ_INTERNAL_DEVICE_CONTROL / IOCTL_INTERNAL_I8042_HOOK_KEYBOARD\n"); + TRACE_(I8042PRT, "IRP_MJ_INTERNAL_DEVICE_CONTROL / IOCTL_INTERNAL_I8042_HOOK_KEYBOARD\n"); /* Nothing to do here */ Status = STATUS_SUCCESS; break; } case IOCTL_KEYBOARD_QUERY_INDICATOR_TRANSLATION: { - DPRINT("IRP_MJ_INTERNAL_DEVICE_CONTROL / IOCTL_KEYBOARD_QUERY_INDICATOR_TRANSLATION\n"); + TRACE_(I8042PRT, "IRP_MJ_INTERNAL_DEVICE_CONTROL / IOCTL_KEYBOARD_QUERY_INDICATOR_TRANSLATION\n"); /* We should check the UnitID, but it's kind of pointless as * all keyboards are supposed to have the same one @@ -653,7 +653,7 @@ } case IOCTL_KEYBOARD_QUERY_INDICATORS: { - DPRINT("IRP_MJ_INTERNAL_DEVICE_CONTROL / IOCTL_KEYBOARD_QUERY_INDICATORS\n"); + TRACE_(I8042PRT, "IRP_MJ_INTERNAL_DEVICE_CONTROL / IOCTL_KEYBOARD_QUERY_INDICATORS\n"); if (Stack->Parameters.DeviceIoControl.InputBufferLength < sizeof(KEYBOARD_INDICATOR_PARAMETERS)) { @@ -672,7 +672,7 @@ } case IOCTL_KEYBOARD_SET_INDICATORS: { - DPRINT("IRP_MJ_INTERNAL_DEVICE_CONTROL / IOCTL_KEYBOARD_SET_INDICATORS\n"); + TRACE_(I8042PRT, "IRP_MJ_INTERNAL_DEVICE_CONTROL / IOCTL_KEYBOARD_SET_INDICATORS\n"); if (Stack->Parameters.DeviceIoControl.InputBufferLength < sizeof(KEYBOARD_INDICATOR_PARAMETERS)) { @@ -692,7 +692,7 @@ } default: { - DPRINT("IRP_MJ_INTERNAL_DEVICE_CONTROL / unknown ioctl code 0x%lx\n", + ERR_(I8042PRT, "IRP_MJ_INTERNAL_DEVICE_CONTROL / unknown ioctl code 0x%lx\n", Stack->Parameters.DeviceIoControl.IoControlCode); ASSERT(FALSE); return ForwardIrpAndForget(DeviceObject, Irp); @@ -765,7 +765,7 @@ Status = i8042ReadStatus(PortDeviceExtension, &PortStatus); if (!NT_SUCCESS(Status)) { - DPRINT("i8042ReadStatus() failed with status 0x%08lx\n", Status); + WARN_(I8042PRT, "i8042ReadStatus() failed with status 0x%08lx\n", Status); return FALSE; } Status = i8042ReadKeyboardData(PortDeviceExtension, &Output); @@ -776,11 +776,11 @@ } if (Counter == 0) { - DPRINT("Spurious i8042 keyboard interrupt\n"); + WARN_(I8042PRT, "Spurious i8042 keyboard interrupt\n"); return FALSE; } - DPRINT("Got: 0x%02x\n", Output); + INFO_(I8042PRT, "Got: 0x%02x\n", Output); if (PortDeviceExtension->Settings.CrashOnCtrlScroll) { @@ -806,14 +806,14 @@ { if (PortDeviceExtension->PacketComplete) { - DPRINT("Packet complete\n"); + TRACE_(I8042PRT, "Packet complete\n"); KeInsertQueueDpc(&DeviceExtension->DpcKeyboard, NULL, NULL); } - DPRINT("Irq eaten by packet\n"); + TRACE_(I8042PRT, "Irq eaten by packet\n"); return TRUE; } - DPRINT("Irq is keyboard input\n"); + TRACE_(I8042PRT, "Irq is keyboard input\n"); if (DeviceExtension->KeyboardScanState == Normal) { Modified: trunk/reactos/drivers/input/i8042prt/misc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/input/i8042prt/mis…
============================================================================== --- trunk/reactos/drivers/input/i8042prt/misc.c (original) +++ trunk/reactos/drivers/input/i8042prt/misc.c Mon Dec 17 00:12:54 2007 @@ -12,45 +12,19 @@ /* FUNCTIONS *****************************************************************/ -static IO_COMPLETION_ROUTINE ForwardIrpAndWaitCompletion; - -static NTSTATUS NTAPI -ForwardIrpAndWaitCompletion( - IN PDEVICE_OBJECT DeviceObject, - IN PIRP Irp, - IN PVOID Context) -{ - if (Irp->PendingReturned) - KeSetEvent((PKEVENT)Context, IO_NO_INCREMENT, FALSE); - return STATUS_MORE_PROCESSING_REQUIRED; -} - NTSTATUS NTAPI ForwardIrpAndWait( IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { PDEVICE_OBJECT LowerDevice = ((PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->LowerDevice; - KEVENT Event; - NTSTATUS Status; ASSERT(LowerDevice); - KeInitializeEvent(&Event, NotificationEvent, FALSE); - IoCopyCurrentIrpStackLocationToNext(Irp); + if (!IoForwardIrpSynchronously(LowerDevice, Irp)) + return STATUS_UNSUCCESSFUL; - DPRINT("Calling lower device %p\n", LowerDevice); - IoSetCompletionRoutine(Irp, ForwardIrpAndWaitCompletion, &Event, TRUE, TRUE, TRUE); - - Status = IoCallDriver(LowerDevice, Irp); - if (Status == STATUS_PENDING) - { - Status = KeWaitForSingleObject(&Event, Suspended, KernelMode, FALSE, NULL); - if (NT_SUCCESS(Status)) - Status = Irp->IoStatus.Status; - } - - return Status; + return Irp->IoStatus.Status; } NTSTATUS NTAPI Modified: trunk/reactos/drivers/input/i8042prt/mouse.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/input/i8042prt/mou…
============================================================================== --- trunk/reactos/drivers/input/i8042prt/mouse.c (original) +++ trunk/reactos/drivers/input/i8042prt/mouse.c Mon Dec 17 00:12:54 2007 @@ -50,11 +50,11 @@ DeviceExtension->MouseInBuffer++; if (DeviceExtension->MouseInBuffer > DeviceExtension->Common.PortDeviceExtension->Settings.MouseDataQueueSize) { - DPRINT1("Mouse buffer overflow\n"); + WARN_(I8042PRT, "Mouse buffer overflow\n"); DeviceExtension->MouseInBuffer--; } - DPRINT("Irq completes mouse packet\n"); + TRACE_(I8042PRT, "Irq completes mouse packet\n"); KeInsertQueueDpc(&DeviceExtension->DpcMouse, NULL, NULL); } @@ -75,7 +75,7 @@ * might be lucky and get in sync again */ if (!(Output & 8)) { - DPRINT1("Bad input, dropping..\n"); + WARN_(I8042PRT, "Bad input, dropping..\n"); return; } @@ -172,7 +172,7 @@ break; default: - DPRINT1("Unexpected state 0x%u!\n", DeviceExtension->MouseState); + ERR_(I8042PRT, "Unexpected state 0x%u!\n", DeviceExtension->MouseState); ASSERT(FALSE); } } @@ -202,7 +202,7 @@ (((~(NewButtonData)) << 1) & (ButtonDiff << 1)) | (MouseInput->RawButtons & 0xfc00); - DPRINT("Left raw/up/down: %u/%u/%u\n", + INFO_(I8042PRT, "Left raw/up/down: %u/%u/%u\n", MouseInput->RawButtons & MOUSE_LEFT_BUTTON_DOWN, MouseInput->ButtonFlags & MOUSE_LEFT_BUTTON_DOWN, MouseInput->ButtonFlags & MOUSE_LEFT_BUTTON_UP); @@ -291,12 +291,12 @@ KeReleaseInterruptSpinLock(PortDeviceExtension->HighestDIRQLInterrupt, Irql); - DPRINT("Send a mouse packet\n"); + TRACE_(I8042PRT, "Send a mouse packet\n"); if (!DeviceExtension->MouseData.ClassService) return; - DPRINT("Sending %lu mouse move(s)\n", MouseInBufferCopy); + INFO_(I8042PRT, "Sending %lu mouse move(s)\n", MouseInBufferCopy); (*(PSERVICE_CALLBACK_ROUTINE)DeviceExtension->MouseData.ClassService)( DeviceExtension->MouseData.ClassDeviceObject, DeviceExtension->MouseBuffer, @@ -333,7 +333,7 @@ Irql = KeAcquireInterruptSpinLock(PortDeviceExtension->HighestDIRQLInterrupt); - DPRINT1("Mouse initialization timeout! (substate %x). Disabling mouse.\n", + WARN_(I8042PRT, "Mouse initialization timeout! (substate %x). Disabling mouse.\n", DeviceExtension->MouseResetState); i8042Flush(PortDeviceExtension); @@ -369,7 +369,7 @@ PIO_WORKITEM WorkItem = NULL; PI8042_HOOK_WORKITEM WorkItemData = NULL; - DPRINT("IRP_MJ_INTERNAL_DEVICE_CONTROL / IOCTL_INTERNAL_MOUSE_CONNECT\n"); + TRACE_(I8042PRT, "IRP_MJ_INTERNAL_DEVICE_CONTROL / IOCTL_INTERNAL_MOUSE_CONNECT\n"); if (Stack->Parameters.DeviceIoControl.InputBufferLength != sizeof(CONNECT_DATA)) { Status = STATUS_INVALID_PARAMETER; @@ -383,7 +383,7 @@ WorkItem = IoAllocateWorkItem(DeviceObject); if (!WorkItem) { - DPRINT("IoAllocateWorkItem() failed\n"); + WARN_(I8042PRT, "IoAllocateWorkItem() failed\n"); Status = STATUS_INSUFFICIENT_RESOURCES; goto cleanup; } @@ -393,7 +393,7 @@ I8042PRT_TAG); if (!WorkItemData) { - DPRINT("ExAllocatePoolWithTag() failed\n"); + WARN_(I8042PRT, "ExAllocatePoolWithTag() failed\n"); Status = STATUS_NO_MEMORY; goto cleanup; } @@ -409,7 +409,7 @@ I8042PRT_TAG); if (!DeviceExtension->MouseBuffer) { - DPRINT("ExAllocatePoolWithTag() failed\n"); + WARN_(I8042PRT, "ExAllocatePoolWithTag() failed\n"); Status = STATUS_NO_MEMORY; goto cleanup; } @@ -452,7 +452,7 @@ } case IOCTL_INTERNAL_MOUSE_DISCONNECT: { - DPRINT("IRP_MJ_INTERNAL_DEVICE_CONTROL / IOCTL_INTERNAL_MOUSE_DISCONNECT\n"); + TRACE_(I8042PRT, "IRP_MJ_INTERNAL_DEVICE_CONTROL / IOCTL_INTERNAL_MOUSE_DISCONNECT\n"); /* MSDN says that operation is to implemented. * To implement it, we just have to do: * DeviceExtension->MouseData.ClassService = NULL; @@ -462,14 +462,14 @@ } case IOCTL_INTERNAL_I8042_HOOK_MOUSE: { - DPRINT("IRP_MJ_INTERNAL_DEVICE_CONTROL / IOCTL_INTERNAL_I8042_HOOK_MOUSE\n"); + TRACE_(I8042PRT, "IRP_MJ_INTERNAL_DEVICE_CONTROL / IOCTL_INTERNAL_I8042_HOOK_MOUSE\n"); /* Nothing to do here */ Status = STATUS_SUCCESS; break; } default: { - DPRINT("IRP_MJ_INTERNAL_DEVICE_CONTROL / unknown ioctl code 0x%lx\n", + ERR_(I8042PRT, "IRP_MJ_INTERNAL_DEVICE_CONTROL / unknown ioctl code 0x%lx\n", Stack->Parameters.DeviceIoControl.IoControlCode); ASSERT(FALSE); return ForwardIrpAndForget(DeviceObject, Irp); @@ -509,7 +509,7 @@ if (Now.QuadPart - DeviceExtension->MousePacketStartTime.QuadPart > DeviceExtension->Common.PortDeviceExtension->Settings.MouseSynchIn100ns) { - DPRINT("Mouse input packet timeout\n"); + WARN_(I8042PRT, "Mouse input packet timeout\n"); DeviceExtension->MouseState = MouseIdle; } } @@ -588,7 +588,7 @@ { PortDeviceExtension->Flags &= ~MOUSE_PRESENT; DeviceExtension->MouseState = MouseIdle; - DPRINT("Mouse returned bad reset reply: %x (expected aa)\n", Value); + WARN_(I8042PRT, "Mouse returned bad reset reply: %x (expected aa)\n", Value); } return TRUE; case ExpectingResetId: @@ -602,7 +602,7 @@ { PortDeviceExtension->Flags &= ~MOUSE_PRESENT; DeviceExtension->MouseState = MouseIdle; - DPRINT1("Mouse returned bad reset reply part two: %x (expected 0)\n", Value); + WARN_(I8042PRT, "Mouse returned bad reset reply part two: %x (expected 0)\n", Value); } return TRUE; case ExpectingGetDeviceIdACK: @@ -614,7 +614,7 @@ { DeviceExtension->MouseResetState++; /* Act as if 00 (normal mouse) was received */ - DPRINT("Mouse doesn't support 0xd2, (returns %x, expected %x), faking\n", Value, MOUSE_ACK); + WARN_(I8042PRT, "Mouse doesn't support 0xd2, (returns %x, expected %x), faking\n", Value, MOUSE_ACK); i8042MouResetIsr(DeviceExtension, Status, 0); } return TRUE; @@ -787,7 +787,7 @@ DeviceExtension->MouseHook.IsrWritePort( DeviceExtension->MouseHook.CallContext, (UCHAR)(PortDeviceExtension->Settings.MouseResolution & 0xff)); - DPRINT("Mouse resolution %lu\n", + INFO_(I8042PRT, "Mouse resolution %lu\n", PortDeviceExtension->Settings.MouseResolution); DeviceExtension->MouseResetState = ExpectingFinalResolutionValueACK; return TRUE; @@ -798,11 +798,11 @@ case ExpectingEnableACK: DeviceExtension->MouseState = MouseIdle; DeviceExtension->MouseTimeoutState = TimeoutCancel; - DPRINT("Mouse type = %u\n", DeviceExtension->MouseType); + INFO_(I8042PRT, "Mouse type = %u\n", DeviceExtension->MouseType); return TRUE; default: if (DeviceExtension->MouseResetState < 100 || DeviceExtension->MouseResetState > 999) - DPRINT1("MouseResetState went out of range: %lu\n", DeviceExtension->MouseResetState); + ERR_(I8042PRT, "MouseResetState went out of range: %lu\n", DeviceExtension->MouseResetState); return FALSE; } } @@ -827,7 +827,7 @@ Status = i8042ReadStatus(PortDeviceExtension, &PortStatus); if (!NT_SUCCESS(Status)) { - DPRINT("i8042ReadStatus() failed with status 0x%08lx\n", Status); + WARN_(I8042PRT, "i8042ReadStatus() failed with status 0x%08lx\n", Status); return FALSE; } Status = i8042ReadMouseData(PortDeviceExtension, &Output); @@ -838,30 +838,30 @@ } if (Counter == 0) { - DPRINT("Spurious i8042 mouse interrupt\n"); + WARN_(I8042PRT, "Spurious i8042 mouse interrupt\n"); return FALSE; } - DPRINT("Got: 0x%02x\n", Output); + INFO_(I8042PRT, "Got: 0x%02x\n", Output); if (i8042PacketIsr(PortDeviceExtension, Output)) { if (PortDeviceExtension->PacketComplete) { - DPRINT("Packet complete\n"); + TRACE_(I8042PRT, "Packet complete\n"); KeInsertQueueDpc(&DeviceExtension->DpcMouse, NULL, NULL); } - DPRINT("Irq eaten by packet\n"); + TRACE_(I8042PRT, "Irq eaten by packet\n"); return TRUE; } - DPRINT("Irq is mouse input\n"); + TRACE_(I8042PRT, "Irq is mouse input\n"); i8042MouInputTestTimeout(DeviceExtension); if (i8042MouResetIsr(DeviceExtension, PortStatus, Output)) { - DPRINT("Handled by ResetIsr or hooked Isr\n"); + TRACE_(I8042PRT, "Handled by ResetIsr or hooked Isr\n"); if (NoChange != DeviceExtension->MouseTimeoutState) { KeInsertQueueDpc(&DeviceExtension->DpcMouse, NULL, NULL); } @@ -1035,10 +1035,10 @@ if (TestMouse(DeviceExtension)) { - DPRINT("Detected Mouse\n"); + TRACE_(I8042PRT, "Detected Mouse\n"); if (SendCommand(DeviceExtension, NULL, PSMOUSE_CMD_ENABLE)) - DPRINT1("Failed to enable mouse!\n"); + WARN_(I8042PRT, "Failed to enable mouse!\n"); } return TRUE; Modified: trunk/reactos/drivers/input/i8042prt/pnp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/input/i8042prt/pnp…
============================================================================== --- trunk/reactos/drivers/input/i8042prt/pnp.c (original) +++ trunk/reactos/drivers/input/i8042prt/pnp.c Mon Dec 17 00:12:54 2007 @@ -41,14 +41,14 @@ if (!i8042Write(DeviceExtension, DeviceExtension->ControlPort, KBD_READ_MODE)) { - DPRINT1("Can't read i8042 mode\n"); + WARN_(I8042PRT, "Can't read i8042 mode\n"); return FALSE; } Status = i8042ReadDataWait(DeviceExtension, &Value); if (!NT_SUCCESS(Status)) { - DPRINT1("No response after read i8042 mode\n"); + WARN_(I8042PRT, "No response after read i8042 mode\n"); return FALSE; } @@ -57,13 +57,13 @@ if (!i8042Write(DeviceExtension, DeviceExtension->ControlPort, KBD_WRITE_MODE)) { - DPRINT1("Can't set i8042 mode\n"); + WARN_(I8042PRT, "Can't set i8042 mode\n"); return FALSE; } if (!i8042Write(DeviceExtension, DeviceExtension->DataPort, Value)) { - DPRINT1("Can't send i8042 mode\n"); + WARN_(I8042PRT, "Can't send i8042 mode\n"); return FALSE; } @@ -85,20 +85,20 @@ if (!i8042Write(DeviceExtension, DeviceExtension->ControlPort, CTRL_SELF_TEST)) { - DPRINT1("Writing CTRL_SELF_TEST command failed\n"); + WARN_(I8042PRT, "Writing CTRL_SELF_TEST command failed\n"); return STATUS_IO_TIMEOUT; } Status = i8042ReadDataWait(DeviceExtension, &Value); if (!NT_SUCCESS(Status)) { - DPRINT1("Failed to read CTRL_SELF_TEST response, status 0x%08lx\n", Status); + WARN_(I8042PRT, "Failed to read CTRL_SELF_TEST response, status 0x%08lx\n", Status); return Status; } if (Value != 0x55) { - DPRINT1("Got 0x%02x instead of 0x55\n", Value); + WARN_(I8042PRT, "Got 0x%02x instead of 0x55\n", Value); return STATUS_IO_DEVICE_ERROR; } @@ -136,13 +136,13 @@ Status = i8042SynchWritePort(DeviceExtension, 0, 0, TRUE); if (!NT_SUCCESS(Status)) { - DPRINT("Can't finish SET_LEDS (0x%08lx)\n", Status); + WARN_(I8042PRT, "Can't finish SET_LEDS (0x%08lx)\n", Status); return FALSE; } } else { - DPRINT("Warning: can't write SET_LEDS (0x%08lx)\n", Status); + WARN_(I8042PRT, "Warning: can't write SET_LEDS (0x%08lx)\n", Status); } /* Turn on translation and SF (Some machines don't reboot if SF is not set) */ @@ -167,7 +167,7 @@ if (!i8042Write(DeviceExtension, DeviceExtension->ControlPort, CTRL_WRITE_MOUSE) ||!i8042Write(DeviceExtension, DeviceExtension->DataPort, MOU_CMD_RESET)) { - DPRINT1("Failed to write reset command to mouse\n"); + WARN_(I8042PRT, "Failed to write reset command to mouse\n"); goto cleanup; } @@ -184,12 +184,12 @@ if (!NT_SUCCESS(Status)) { - DPRINT1("No ACK after mouse reset, status 0x%08lx\n", Status); + WARN_(I8042PRT, "No ACK after mouse reset, status 0x%08lx\n", Status); goto cleanup; } else if (Value != ExpectedReply[ReplyByte]) { - DPRINT1("Unexpected reply: 0x%02x (expected 0x%02x)\n", + WARN_(I8042PRT, "Unexpected reply: 0x%02x (expected 0x%02x)\n", Value, ExpectedReply[ReplyByte]); goto cleanup; } @@ -210,7 +210,7 @@ i8042Flush(DeviceExtension); } - DPRINT("Mouse %sdetected\n", Ok ? "" : "not "); + INFO_(I8042PRT, "Mouse %sdetected\n", Ok ? "" : "not "); return Ok; } @@ -223,24 +223,24 @@ KIRQL DirqlMax; NTSTATUS Status; - DPRINT("i8042ConnectKeyboardInterrupt()\n"); + TRACE_(I8042PRT, "i8042ConnectKeyboardInterrupt()\n"); PortDeviceExtension = DeviceExtension->Common.PortDeviceExtension; DirqlMax = MAX( PortDeviceExtension->KeyboardInterrupt.Dirql, PortDeviceExtension->MouseInterrupt.Dirql); - DPRINT("KeyboardInterrupt.Vector %lu\n", + INFO_(I8042PRT, "KeyboardInterrupt.Vector %lu\n", PortDeviceExtension->KeyboardInterrupt.Vector); - DPRINT("KeyboardInterrupt.Dirql %lu\n", + INFO_(I8042PRT, "KeyboardInterrupt.Dirql %lu\n", PortDeviceExtension->KeyboardInterrupt.Dirql); - DPRINT("KeyboardInterrupt.DirqlMax %lu\n", + INFO_(I8042PRT, "KeyboardInterrupt.DirqlMax %lu\n", DirqlMax); - DPRINT("KeyboardInterrupt.InterruptMode %s\n", + INFO_(I8042PRT, "KeyboardInterrupt.InterruptMode %s\n", PortDeviceExtension->KeyboardInterrupt.InterruptMode == LevelSensitive ? "LevelSensitive" : "Latched"); - DPRINT("KeyboardInterrupt.ShareInterrupt %s\n", + INFO_(I8042PRT, "KeyboardInterrupt.ShareInterrupt %s\n", PortDeviceExtension->KeyboardInterrupt.ShareInterrupt ? "yes" : "no"); - DPRINT("KeyboardInterrupt.Affinity 0x%lx\n", + INFO_(I8042PRT, "KeyboardInterrupt.Affinity 0x%lx\n", PortDeviceExtension->KeyboardInterrupt.Affinity); Status = IoConnectInterrupt( &PortDeviceExtension->KeyboardInterrupt.Object, @@ -251,7 +251,7 @@ PortDeviceExtension->KeyboardInterrupt.Affinity, FALSE); if (!NT_SUCCESS(Status)) { - DPRINT("IoConnectInterrupt() failed with status 0x%08x\n", Status); + WARN_(I8042PRT, "IoConnectInterrupt() failed with status 0x%08x\n", Status); return Status; } @@ -269,7 +269,7 @@ KIRQL DirqlMax; NTSTATUS Status; - DPRINT("i8042ConnectMouseInterrupt()\n"); + TRACE_(I8042PRT, "i8042ConnectMouseInterrupt()\n"); Status = i8042MouInitialize(DeviceExtension); if (!NT_SUCCESS(Status)) @@ -280,17 +280,17 @@ PortDeviceExtension->KeyboardInterrupt.Dirql, PortDeviceExtension->MouseInterrupt.Dirql); - DPRINT("MouseInterrupt.Vector %lu\n", + INFO_(I8042PRT, "MouseInterrupt.Vector %lu\n", PortDeviceExtension->MouseInterrupt.Vector); - DPRINT("MouseInterrupt.Dirql %lu\n", + INFO_(I8042PRT, "MouseInterrupt.Dirql %lu\n", PortDeviceExtension->MouseInterrupt.Dirql); - DPRINT("MouseInterrupt.DirqlMax %lu\n", + INFO_(I8042PRT, "MouseInterrupt.DirqlMax %lu\n", DirqlMax); - DPRINT("MouseInterrupt.InterruptMode %s\n", + INFO_(I8042PRT, "MouseInterrupt.InterruptMode %s\n", PortDeviceExtension->MouseInterrupt.InterruptMode == LevelSensitive ? "LevelSensitive" : "Latched"); - DPRINT("MouseInterrupt.ShareInterrupt %s\n", + INFO_(I8042PRT, "MouseInterrupt.ShareInterrupt %s\n", PortDeviceExtension->MouseInterrupt.ShareInterrupt ? "yes" : "no"); - DPRINT("MouseInterrupt.Affinity 0x%lx\n", + INFO_(I8042PRT, "MouseInterrupt.Affinity 0x%lx\n", PortDeviceExtension->MouseInterrupt.Affinity); Status = IoConnectInterrupt( &PortDeviceExtension->MouseInterrupt.Object, @@ -301,7 +301,7 @@ PortDeviceExtension->MouseInterrupt.Affinity, FALSE); if (!NT_SUCCESS(Status)) { - DPRINT("IoConnectInterrupt() failed with status 0x%08x\n", Status); + WARN_(I8042PRT, "IoConnectInterrupt() failed with status 0x%08x\n", Status); goto cleanup; } @@ -378,21 +378,21 @@ if (!(DeviceExtension->Flags & (KEYBOARD_PRESENT | MOUSE_PRESENT))) { /* Try to detect them */ - DPRINT("Check if the controller is really a i8042\n"); + TRACE_(I8042PRT, "Check if the controller is really a i8042\n"); Status = i8042BasicDetect(DeviceExtension); if (!NT_SUCCESS(Status)) { - DPRINT("i8042BasicDetect() failed with status 0x%08lx\n", Status); + WARN_(I8042PRT, "i8042BasicDetect() failed with status 0x%08lx\n", Status); return STATUS_UNSUCCESSFUL; } - DPRINT("Detecting keyboard\n"); + TRACE_(I8042PRT, "Detecting keyboard\n"); if (!i8042DetectKeyboard(DeviceExtension)) return STATUS_UNSUCCESSFUL; - DPRINT("Detecting mouse\n"); + TRACE_(I8042PRT, "Detecting mouse\n"); if (!i8042DetectMouse(DeviceExtension)) return STATUS_UNSUCCESSFUL; - DPRINT("Keyboard present: %s\n", DeviceExtension->Flags & KEYBOARD_PRESENT ? "YES" : "NO"); - DPRINT("Mouse present : %s\n", DeviceExtension->Flags & MOUSE_PRESENT ? "YES" : "NO"); + INFO_(I8042PRT, "Keyboard present: %s\n", DeviceExtension->Flags & KEYBOARD_PRESENT ? "YES" : "NO"); + INFO_(I8042PRT, "Mouse present : %s\n", DeviceExtension->Flags & MOUSE_PRESENT ? "YES" : "NO"); } /* Connect interrupts */ @@ -468,7 +468,7 @@ ULONG i; NTSTATUS Status; - DPRINT("i8042PnpStartDevice(%p)\n", DeviceObject); + TRACE_(I8042PRT, "i8042PnpStartDevice(%p)\n", DeviceObject); DeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceObject->DeviceExtension; PortDeviceExtension = DeviceExtension->PortDeviceExtension; @@ -476,12 +476,12 @@ if (!AllocatedResources) { - DPRINT("No allocated resources sent to driver\n"); + WARN_(I8042PRT, "No allocated resources sent to driver\n"); return STATUS_INSUFFICIENT_RESOURCES; } if (AllocatedResources->Count != 1) { - DPRINT("Wrong number of allocated resources sent to driver\n"); + WARN_(I8042PRT, "Wrong number of allocated resources sent to driver\n"); return STATUS_INSUFFICIENT_RESOURCES; } if (AllocatedResources->List[0].PartialResourceList.Version != 1 @@ -489,7 +489,7 @@ || AllocatedResourcesTranslated->List[0].PartialResourceList.Version != 1 || AllocatedResourcesTranslated->List[0].PartialResourceList.Revision != 1) { - DPRINT("Revision mismatch: %u.%u != 1.1 or %u.%u != 1.1\n", + WARN_(I8042PRT, "Revision mismatch: %u.%u != 1.1 or %u.%u != 1.1\n", AllocatedResources->List[0].PartialResourceList.Version, AllocatedResources->List[0].PartialResourceList.Revision, AllocatedResourcesTranslated->List[0].PartialResourceList.Version, @@ -515,23 +515,23 @@ if (!FoundDataPort) { PortDeviceExtension->DataPort = ULongToPtr(ResourceDescriptor->u.Port.Start.u.LowPart); - DPRINT("Found data port: %p\n", PortDeviceExtension->DataPort); + INFO_(I8042PRT, "Found data port: %p\n", PortDeviceExtension->DataPort); FoundDataPort = TRUE; } else if (!FoundControlPort) { PortDeviceExtension->ControlPort = ULongToPtr(ResourceDescriptor->u.Port.Start.u.LowPart); - DPRINT("Found control port: %p\n", PortDeviceExtension->ControlPort); + INFO_(I8042PRT, "Found control port: %p\n", PortDeviceExtension->ControlPort); FoundControlPort = TRUE; } else { - DPRINT("Too much I/O ranges provided: 0x%lx\n", ResourceDescriptor->u.Port.Length); + WARN_(I8042PRT, "Too much I/O ranges provided: 0x%lx\n", ResourceDescriptor->u.Port.Length); return STATUS_INVALID_PARAMETER; } } else - DPRINT1("Invalid I/O range length: 0x%lx\n", ResourceDescriptor->u.Port.Length); + WARN_(I8042PRT, "Invalid I/O range length: 0x%lx\n", ResourceDescriptor->u.Port.Length); break; } case CmResourceTypeInterrupt: @@ -546,28 +546,28 @@ else InterruptData.InterruptMode = LevelSensitive; InterruptData.ShareInterrupt = (ResourceDescriptorTranslated->ShareDisposition == CmResourceShareShared); - DPRINT("Found irq resource: %lu\n", ResourceDescriptor->u.Interrupt.Level); + INFO_(I8042PRT, "Found irq resource: %lu\n", ResourceDescriptor->u.Interrupt.Level); FoundIrq = TRUE; break; } default: - DPRINT("Unknown resource descriptor type 0x%x\n", ResourceDescriptor->Type); + WARN_(I8042PRT, "Unknown resource descriptor type 0x%x\n", ResourceDescriptor->Type); } } if (!FoundIrq) { - DPRINT("Interrupt resource was not found in allocated resources list\n"); + WARN_(I8042PRT, "Interrupt resource was not found in allocated resources list\n"); return STATUS_INSUFFICIENT_RESOURCES; } else if (DeviceExtension->Type == Keyboard && (!FoundDataPort || !FoundControlPort)) { - DPRINT("Some required resources were not found in allocated resources list\n"); + WARN_(I8042PRT, "Some required resources were not found in allocated resources list\n"); return STATUS_INSUFFICIENT_RESOURCES; } else if (DeviceExtension->Type == Mouse && (FoundDataPort || FoundControlPort)) { - DPRINT("Too much resources were provided in allocated resources list\n"); + WARN_(I8042PRT, "Too much resources were provided in allocated resources list\n"); return STATUS_INVALID_PARAMETER; } @@ -595,7 +595,7 @@ } default: { - DPRINT1("Unknown FDO type %u\n", DeviceExtension->Type); + ERR_(I8042PRT, "Unknown FDO type %u\n", DeviceExtension->Type); ASSERT(FALSE); Status = STATUS_INVALID_DEVICE_REQUEST; } @@ -626,7 +626,7 @@ { case IRP_MN_START_DEVICE: /* 0x00 */ { - DPRINT("IRP_MJ_PNP / IRP_MN_START_DEVICE\n"); + TRACE_(I8042PRT, "IRP_MJ_PNP / IRP_MN_START_DEVICE\n"); /* Call lower driver (if any) */ if (DeviceType != PhysicalDeviceObject) @@ -650,7 +650,7 @@ { PDEVICE_RELATIONS DeviceRelations; - DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / BusRelations\n"); + TRACE_(I8042PRT, "IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / BusRelations\n"); DeviceRelations = ExAllocatePoolWithTag(PagedPool, sizeof(DEVICE_RELATIONS), I8042PRT_TAG); if (DeviceRelations) { @@ -664,11 +664,11 @@ } case RemovalRelations: { - DPRINT("IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / RemovalRelations\n"); + TRACE_(I8042PRT, "IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / RemovalRelations\n"); return ForwardIrpAndForget(DeviceObject, Irp); } default: - DPRINT1("IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / Unknown type 0x%lx\n", + ERR_(I8042PRT, "IRP_MJ_PNP / IRP_MN_QUERY_DEVICE_RELATIONS / Unknown type 0x%lx\n", Stack->Parameters.QueryDeviceRelations.Type); ASSERT(FALSE); return ForwardIrpAndForget(DeviceObject, Irp); @@ -677,14 +677,14 @@ } case IRP_MN_FILTER_RESOURCE_REQUIREMENTS: /* (optional) 0x0d */ { - DPRINT("IRP_MJ_PNP / IRP_MN_FILTER_RESOURCE_REQUIREMENTS\n"); + TRACE_(I8042PRT, "IRP_MJ_PNP / IRP_MN_FILTER_RESOURCE_REQUIREMENTS\n"); /* Nothing to do */ Status = Irp->IoStatus.Status; break; } default: { - DPRINT1("IRP_MJ_PNP / unknown minor function 0x%x\n", MinorFunction); + ERR_(I8042PRT, "IRP_MJ_PNP / unknown minor function 0x%x\n", MinorFunction); ASSERT(FALSE); return ForwardIrpAndForget(DeviceObject, Irp); } Modified: trunk/reactos/drivers/input/i8042prt/ps2pp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/input/i8042prt/ps2…
============================================================================== --- trunk/reactos/drivers/input/i8042prt/ps2pp.c (original) +++ trunk/reactos/drivers/input/i8042prt/ps2pp.c Mon Dec 17 00:12:54 2007 @@ -88,7 +88,7 @@ (((DeviceExtension->MouseLogiBuffer[1] & 0x0C) >> 2) != (DeviceExtension->MouseLogiBuffer[2] & 0x03))) { - DPRINT1("Ps2pp packet fails sanity checks\n"); + WARN_(I8042PRT, "Ps2pp packet fails sanity checks\n"); return; } @@ -133,6 +133,6 @@ } default: - DPRINT1("Unexpected input state for ps2pp!\n"); + WARN_(I8042PRT, "Unexpected input state for ps2pp!\n"); } } Modified: trunk/reactos/drivers/input/i8042prt/readwrite.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/input/i8042prt/rea…
============================================================================== --- trunk/reactos/drivers/input/i8042prt/readwrite.c (original) +++ trunk/reactos/drivers/input/i8042prt/readwrite.c Mon Dec 17 00:12:54 2007 @@ -22,7 +22,7 @@ UCHAR Ignore; while (NT_SUCCESS(i8042ReadData(DeviceExtension, KBD_OBF | MOU_OBF, &Ignore))) { - DPRINT("Data flushed\n"); /* drop */ + INFO_(I8042PRT, "Data flushed\n"); /* drop */ } } @@ -59,7 +59,7 @@ if (PortStatus & StatusFlags) { *Data = READ_PORT_UCHAR(DeviceExtension->DataPort); - DPRINT("Read: 0x%02x (status: 0x%x)\n", Data[0], PortStatus); + INFO_(I8042PRT, "Read: 0x%02x (status: 0x%x)\n", Data[0], PortStatus); // If the data is valid (not timeout, not parity error) if ((PortStatus & KBD_PERR) == 0) @@ -146,13 +146,13 @@ if (Port) if (!i8042Write(DeviceExtension, DeviceExtension->DataPort, Port)) { - DPRINT1("Failed to write Port\n"); + WARN_(I8042PRT, "Failed to write Port\n"); return STATUS_IO_TIMEOUT; } if (!i8042Write(DeviceExtension, DeviceExtension->DataPort, Value)) { - DPRINT1("Failed to write Value\n"); + WARN_(I8042PRT, "Failed to write Value\n"); return STATUS_IO_TIMEOUT; } @@ -161,19 +161,19 @@ Status = i8042ReadDataWait(DeviceExtension, &Ack); if (!NT_SUCCESS(Status)) { - DPRINT1("Failed to read Ack\n"); + WARN_(I8042PRT, "Failed to read Ack\n"); return Status; } if (Ack == KBD_ACK) return STATUS_SUCCESS; else if (Ack == KBD_RESEND) - DPRINT("i8042 asks for a data resend\n"); + INFO_(I8042PRT, "i8042 asks for a data resend\n"); } else { return STATUS_SUCCESS; } - DPRINT("Reiterating\n"); + TRACE_(I8042PRT, "Reiterating\n"); ResendIterations--; } while (ResendIterations); @@ -205,7 +205,7 @@ if (ResendIterations) { WRITE_PORT_UCHAR(addr, data); - DPRINT("Sent 0x%x to port %p\n", data, addr); + INFO_(I8042PRT, "Sent 0x%x to port %p\n", data, addr); return TRUE; } return FALSE; Modified: trunk/reactos/drivers/input/i8042prt/registry.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/input/i8042prt/reg…
============================================================================== --- trunk/reactos/drivers/input/i8042prt/registry.c (original) +++ trunk/reactos/drivers/input/i8042prt/registry.c Mon Dec 17 00:12:54 2007 @@ -200,7 +200,7 @@ if (!RtlCreateUnicodeString(&Settings->KeyboardDeviceBaseName, DefaultKeyboardDeviceBaseName) || !RtlCreateUnicodeString(&Settings->PointerDeviceBaseName, DefaultPointerDeviceBaseName)) { - DPRINT("RtlCreateUnicodeString() failed\n"); + WARN_(I8042PRT, "RtlCreateUnicodeString() failed\n"); Status = STATUS_NO_MEMORY; } else @@ -211,20 +211,20 @@ if (NT_SUCCESS(Status)) { - DPRINT("KeyboardDataQueueSize : 0x%lx\n", Settings->KeyboardDataQueueSize); - DPRINT("KeyboardDeviceBaseName : %wZ\n", &Settings->KeyboardDeviceBaseName); - DPRINT("MouseDataQueueSize : 0x%lx\n", Settings->MouseDataQueueSize); - DPRINT("MouseResolution : 0x%lx\n", Settings->MouseResolution); - DPRINT("MouseSynchIn100ns : %lu\n", Settings->MouseSynchIn100ns); - DPRINT("NumberOfButtons : 0x%lx\n", Settings->NumberOfButtons); - DPRINT("PointerDeviceBaseName : %wZ\n", &Settings->PointerDeviceBaseName); - DPRINT("PollStatusIterations : 0x%lx\n", Settings->PollStatusIterations); - DPRINT("OverrideKeyboardType : 0x%lx\n", Settings->OverrideKeyboardType); - DPRINT("OverrideKeyboardSubtype : 0x%lx\n", Settings->OverrideKeyboardSubtype); - DPRINT("PollingIterations : 0x%lx\n", Settings->PollingIterations); - DPRINT("PollingIterationsMaximum : %lu\n", Settings->PollingIterationsMaximum); - DPRINT("ResendIterations : 0x%lx\n", Settings->ResendIterations); - DPRINT("SampleRate : %lu\n", Settings->SampleRate); + INFO_(I8042PRT, "KeyboardDataQueueSize : 0x%lx\n", Settings->KeyboardDataQueueSize); + INFO_(I8042PRT, "KeyboardDeviceBaseName : %wZ\n", &Settings->KeyboardDeviceBaseName); + INFO_(I8042PRT, "MouseDataQueueSize : 0x%lx\n", Settings->MouseDataQueueSize); + INFO_(I8042PRT, "MouseResolution : 0x%lx\n", Settings->MouseResolution); + INFO_(I8042PRT, "MouseSynchIn100ns : %lu\n", Settings->MouseSynchIn100ns); + INFO_(I8042PRT, "NumberOfButtons : 0x%lx\n", Settings->NumberOfButtons); + INFO_(I8042PRT, "PointerDeviceBaseName : %wZ\n", &Settings->PointerDeviceBaseName); + INFO_(I8042PRT, "PollStatusIterations : 0x%lx\n", Settings->PollStatusIterations); + INFO_(I8042PRT, "OverrideKeyboardType : 0x%lx\n", Settings->OverrideKeyboardType); + INFO_(I8042PRT, "OverrideKeyboardSubtype : 0x%lx\n", Settings->OverrideKeyboardSubtype); + INFO_(I8042PRT, "PollingIterations : 0x%lx\n", Settings->PollingIterations); + INFO_(I8042PRT, "PollingIterationsMaximum : %lu\n", Settings->PollingIterationsMaximum); + INFO_(I8042PRT, "ResendIterations : 0x%lx\n", Settings->ResendIterations); + INFO_(I8042PRT, "SampleRate : %lu\n", Settings->SampleRate); } return Status; Modified: trunk/reactos/drivers/input/i8042prt/setup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/input/i8042prt/set…
============================================================================== --- trunk/reactos/drivers/input/i8042prt/setup.c (original) +++ trunk/reactos/drivers/input/i8042prt/setup.c Mon Dec 17 00:12:54 2007 @@ -42,7 +42,7 @@ if (hSetupKey != (HANDLE)NULL) ZwClose(hSetupKey); - DPRINT("IsFirstStageSetup() returns %s\n", ret ? "YES" : "NO"); + INFO_(I8042PRT, "IsFirstStageSetup() returns %s\n", ret ? "YES" : "NO"); return ret; } @@ -64,14 +64,14 @@ NTSTATUS Status; Pdo = (PDEVICE_OBJECT)Context; - DPRINT("SendStartDevice(%p)\n", Pdo); + TRACE_(I8042PRT, "SendStartDevice(%p)\n", Pdo); /* Create default resource list */ ResourceListSize = sizeof(CM_RESOURCE_LIST) + 3 * sizeof(CM_PARTIAL_RESOURCE_DESCRIPTOR); AllocatedResources = ExAllocatePoolWithTag(PagedPool, ResourceListSize, I8042PRT_TAG); if (!AllocatedResources) { - DPRINT("ExAllocatePoolWithTag() failed\n"); + WARN_(I8042PRT, "ExAllocatePoolWithTag() failed\n"); Status = STATUS_NO_MEMORY; goto cleanup; } @@ -105,7 +105,7 @@ AllocatedResourcesTranslated = ExAllocatePoolWithTag(PagedPool, ResourceListSize, I8042PRT_TAG); if (!AllocatedResourcesTranslated) { - DPRINT("ExAllocatePoolWithTag() failed\n"); + WARN_(I8042PRT, "ExAllocatePoolWithTag() failed\n"); Status = STATUS_NO_MEMORY; goto cleanup; } @@ -150,7 +150,7 @@ } if (!NT_SUCCESS(Status)) { - DPRINT("IoCallDriver() failed with status 0x%08lx\n", Status); + WARN_(I8042PRT, "IoCallDriver() failed with status 0x%08lx\n", Status); goto cleanup; } @@ -180,7 +180,7 @@ Status = ZwOpenKey(&hDeviceMapKey, 0, &ObjectAttributes); if (!NT_SUCCESS(Status)) { - DPRINT("ZwOpenKey() failed with status 0x%08lx\n", Status); + WARN_(I8042PRT, "ZwOpenKey() failed with status 0x%08lx\n", Status); goto cleanup; } @@ -189,14 +189,14 @@ Status = ZwCreateKey(&hPortKey, KEY_SET_VALUE, &ObjectAttributes, 0, NULL, REG_OPTION_VOLATILE, NULL); if (!NT_SUCCESS(Status)) { - DPRINT("ZwCreateKey() failed with status 0x%08lx\n", Status); + WARN_(I8042PRT, "ZwCreateKey() failed with status 0x%08lx\n", Status); goto cleanup; } Status = ZwSetValueKey(hPortKey, DeviceName, 0, REG_SZ, (PVOID)RegistryPath, wcslen(RegistryPath) * sizeof(WCHAR) + sizeof(UNICODE_NULL)); if (!NT_SUCCESS(Status)) { - DPRINT("ZwSetValueKey() failed with status 0x%08lx\n", Status); + WARN_(I8042PRT, "ZwSetValueKey() failed with status 0x%08lx\n", Status); goto cleanup; } @@ -220,7 +220,7 @@ PDEVICE_OBJECT Pdo = NULL; NTSTATUS Status; - DPRINT("i8042AddLegacyKeyboard()\n"); + TRACE_(I8042PRT, "i8042AddLegacyKeyboard()\n"); /* Create a named PDO */ Status = IoCreateDevice( @@ -233,7 +233,7 @@ &Pdo); if (!NT_SUCCESS(Status)) { - DPRINT("IoCreateDevice() failed with status 0x%08lx\n", Status); + WARN_(I8042PRT, "IoCreateDevice() failed with status 0x%08lx\n", Status); goto cleanup; } @@ -247,7 +247,7 @@ Status = i8042AddDevice(DriverObject, Pdo); if (!NT_SUCCESS(Status)) { - DPRINT("i8042AddDevice() failed with status 0x%08lx\n", Status); + WARN_(I8042PRT, "i8042AddDevice() failed with status 0x%08lx\n", Status); goto cleanup; }
17 years
1
0
0
0
[hpoussin] 31286: Use kernel facilities to change debug level at runtime
by hpoussin@svn.reactos.org
Author: hpoussin Date: Mon Dec 17 00:00:44 2007 New Revision: 31286 URL:
http://svn.reactos.org/svn/reactos?rev=31286&view=rev
Log: Use kernel facilities to change debug level at runtime Modified: trunk/reactos/drivers/network/tcpip/include/debug.h trunk/reactos/drivers/network/tcpip/tcpip/main.c trunk/reactos/include/ddk/winddk.h trunk/reactos/lib/drivers/ip/network/routines.c Modified: trunk/reactos/drivers/network/tcpip/include/debug.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/incl…
============================================================================== --- trunk/reactos/drivers/network/tcpip/include/debug.h (original) +++ trunk/reactos/drivers/network/tcpip/include/debug.h Mon Dec 17 00:00:44 2007 @@ -9,11 +9,9 @@ #ifndef __DEBUG_H #define __DEBUG_H -#define NORMAL_MASK 0x000000FF -#define SPECIAL_MASK 0xFFFFFF00 -#define MIN_TRACE 0x00000001 -#define MID_TRACE 0x00000002 -#define MAX_TRACE 0x00000003 +#define MIN_TRACE DPFLTR_WARNING_LEVEL +#define MID_TRACE DPFLTR_WARNING_LEVEL | DPFLTR_TRACE_LEVEL +#define MAX_TRACE DPFLTR_WARNING_LEVEL | DPFLTR_TRACE_LEVEL | DPFLTR_INFO_LEVEL #define DEBUG_CHECK 0x00000100 #define DEBUG_MEMORY 0x00000200 @@ -33,33 +31,14 @@ #define DEBUG_CPOINT 0x00800000 #define DEBUG_LOCK 0x01000000 #define DEBUG_INFO 0x02000000 -#define DEBUG_ULTRA 0xFFFFFFFF +#define DEBUG_ULTRA 0x7FFFFFFF #ifdef DBG -extern DWORD DebugTraceLevel; - -#ifdef _MSC_VER - +#define REMOVE_PARENS(...) __VA_ARGS__ #define TI_DbgPrint(_t_, _x_) \ - if (((DebugTraceLevel & NORMAL_MASK) >= _t_) || \ - ((DebugTraceLevel & _t_) > NORMAL_MASK)) { \ - DbgPrint("(%s:%d) ", __FILE__, __LINE__); \ - DbgPrint _x_ ; \ - } - -#else /* _MSC_VER */ - -#define TI_DbgPrint(_t_, _x_) \ - if (((DebugTraceLevel & NORMAL_MASK) >= _t_) || \ - ((DebugTraceLevel & _t_) > NORMAL_MASK)) { \ - DbgPrint("(%s:%d)(%s) ", __FILE__, __LINE__, __FUNCTION__); \ - DbgPrint _x_ ; \ - } - -#endif /* _MSC_VER */ - -#define ASSERT_IRQL(x) ASSERT(KeGetCurrentIrql() <= (x)) + DbgPrintEx(DPFLTR_TCPIP_ID, (_t_) & DPFLTR_MASK, "(%s:%d) ", __FILE__, __LINE__), \ + DbgPrintEx(DPFLTR_TCPIP_ID, (_t_) & DPFLTR_MASK, REMOVE_PARENS _x_) #else /* DBG */ Modified: trunk/reactos/drivers/network/tcpip/tcpip/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/tcpi…
============================================================================== --- trunk/reactos/drivers/network/tcpip/tcpip/main.c (original) +++ trunk/reactos/drivers/network/tcpip/tcpip/main.c Mon Dec 17 00:00:44 2007 @@ -419,10 +419,7 @@ } -NTSTATUS -#ifndef _MSC_VER -STDCALL -#endif +NTSTATUS NTAPI TiDispatchInternal( PDEVICE_OBJECT DeviceObject, PIRP Irp) @@ -526,10 +523,7 @@ } -NTSTATUS -#ifndef _MSC_VER -STDCALL -#endif +NTSTATUS NTAPI TiDispatch( PDEVICE_OBJECT DeviceObject, PIRP Irp) @@ -687,10 +681,7 @@ } } -NTSTATUS -#ifndef _MSC_VER -STDCALL -#endif +NTSTATUS NTAPI DriverEntry( PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) @@ -870,14 +861,14 @@ DueTime.QuadPart = -(LONGLONG)IP_TIMEOUT * 10000; KeSetTimerEx(&IPTimer, DueTime, IP_TIMEOUT, &IPTimeoutDpc); + /* ROS Hack: ideally, DebugTraceLevel variable should be removed */ + DbgSetDebugFilterState(DPFLTR_TCPIP_ID, DebugTraceLevel, TRUE); + return STATUS_SUCCESS; } -VOID -#ifndef _MSC_VER -STDCALL -#endif +VOID NTAPI IPAddInterface( DWORD Unknown0, DWORD Unknown1, @@ -889,10 +880,7 @@ } -VOID -#ifndef _MSC_VER -STDCALL -#endif +VOID NTAPI IPDelInterface( DWORD Unknown0) { @@ -900,10 +888,7 @@ } -VOID -#ifndef _MSC_VER -STDCALL -#endif +VOID NTAPI LookupRoute( DWORD Unknown0, DWORD Unknown1) Modified: trunk/reactos/include/ddk/winddk.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/winddk.h?rev=3…
============================================================================== --- trunk/reactos/include/ddk/winddk.h (original) +++ trunk/reactos/include/ddk/winddk.h Mon Dec 17 00:00:44 2007 @@ -240,7 +240,12 @@ #define DPFLTR_INFO_LEVEL 3 #define DPFLTR_MASK 0x80000000 -#define DPFLTR_PREFETCHER_ID 63 +typedef enum _DPFLTR_TYPE +{ + DPFLTR_I8042PRT_ID = 15, + DPFLTR_TCPIP_ID = 30, + DPFLTR_PREFETCHER_ID = 65, +} DPFLTR_TYPE; #define MAXIMUM_PROCESSORS 32 Modified: trunk/reactos/lib/drivers/ip/network/routines.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/network/rou…
============================================================================== --- trunk/reactos/lib/drivers/ip/network/routines.c (original) +++ trunk/reactos/lib/drivers/ip/network/routines.c Mon Dec 17 00:00:44 2007 @@ -94,7 +94,8 @@ UINT Length; PCHAR Buffer; - if ((DebugTraceLevel & (DEBUG_PBUFFER | DEBUG_TCP)) != (DEBUG_PBUFFER | DEBUG_TCP)) { + if (!DbgQueryDebugFilterState(DPFLTR_TCPIP_ID, DEBUG_PBUFFER | DPFLTR_MASK) || + !DbgQueryDebugFilterState(DPFLTR_TCPIP_ID, DEBUG_TCP | DPFLTR_MASK)) { return; } @@ -137,7 +138,8 @@ PNDIS_BUFFER NextBuffer; PCHAR CharBuffer; - if ((DebugTraceLevel & (DEBUG_PBUFFER | DEBUG_IP)) != (DEBUG_PBUFFER | DEBUG_IP)) { + if (!DbgQueryDebugFilterState(DPFLTR_TCPIP_ID, DEBUG_PBUFFER | DPFLTR_MASK) || + !DbgQueryDebugFilterState(DPFLTR_TCPIP_ID, DEBUG_IP | DPFLTR_MASK)) { return; }
17 years
1
0
0
0
[fireball] 31285: - Properly allocate ArcDisk info, so it gets correctly mapped later. Fixes spontaneous INACCESSIBLE_BOOT_DEVICE errors.
by fireball@svn.reactos.org
Author: fireball Date: Sun Dec 16 23:28:29 2007 New Revision: 31285 URL:
http://svn.reactos.org/svn/reactos?rev=31285&view=rev
Log: - Properly allocate ArcDisk info, so it gets correctly mapped later. Fixes spontaneous INACCESSIBLE_BOOT_DEVICE errors. Modified: branches/winldr/windows/peloader.c branches/winldr/windows/winldr.c Modified: branches/winldr/windows/peloader.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/windows/peloader.c?rev=3…
============================================================================== --- branches/winldr/windows/peloader.c (original) +++ branches/winldr/windows/peloader.c Sun Dec 16 23:28:29 2007 @@ -106,8 +106,14 @@ ImportTable = (PIMAGE_IMPORT_DESCRIPTOR)RtlImageDirectoryEntryToData(VaToPa(ScanDTE->DllBase), TRUE, IMAGE_DIRECTORY_ENTRY_IMPORT, &ImportTableSize); - DbgPrint((DPRINT_WINDOWS, "WinLdrScanImportDescriptorTable(): %S ImportTable = 0x%X\n", - VaToPa(ScanDTE->BaseDllName.Buffer),ImportTable)); + { + UNICODE_STRING BaseName; + BaseName.Buffer = VaToPa(ScanDTE->BaseDllName.Buffer); + BaseName.MaximumLength = ScanDTE->BaseDllName.MaximumLength; + BaseName.Length = ScanDTE->BaseDllName.Length; + DbgPrint((DPRINT_WINDOWS, "WinLdrScanImportDescriptorTable(): %wZ ImportTable = 0x%X\n", + &BaseName, ImportTable)); + } /* If image doesn't have any import directory - just return success */ if (ImportTable == NULL) Modified: branches/winldr/windows/winldr.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/windows/winldr.c?rev=312…
============================================================================== --- branches/winldr/windows/winldr.c (original) +++ branches/winldr/windows/winldr.c Sun Dec 16 23:28:29 2007 @@ -29,9 +29,6 @@ extern ARC_DISK_SIGNATURE reactos_arc_disk_info[]; extern char reactos_arc_strings[32][256]; -ARC_DISK_SIGNATURE BldrDiskInfo[32]; -CHAR BldrArcNames[32][256]; - BOOLEAN WinLdrCheckForLoadedDll(IN OUT PLOADER_PARAMETER_BLOCK WinLdrBlock, IN PCH DllName, @@ -138,7 +135,7 @@ PARC_DISK_SIGNATURE ArcDiskInfo; /* Get the ARC structure */ - ArcDiskInfo = (PARC_DISK_SIGNATURE)MmHeapAlloc(sizeof(ARC_DISK_SIGNATURE));//&BldrDiskInfo[i]; + ArcDiskInfo = (PARC_DISK_SIGNATURE)MmHeapAlloc(sizeof(ARC_DISK_SIGNATURE)); RtlZeroMemory(ArcDiskInfo, sizeof(ARC_DISK_SIGNATURE)); /* Copy the data over */ @@ -146,9 +143,9 @@ ArcDiskInfo->CheckSum = reactos_arc_disk_info[i].CheckSum; /* Copy the ARC Name */ - //ArcDiskInfo->ArcName = (PCHAR)MmAllocateMemory(sizeof(CHAR)*256); - strcpy(BldrArcNames[i], reactos_arc_disk_info[i].ArcName); - ArcDiskInfo->ArcName = (PCHAR)PaToVa(BldrArcNames[i]); + ArcDiskInfo->ArcName = (PCHAR)MmHeapAlloc(sizeof(CHAR)*256); + strcpy(ArcDiskInfo->ArcName, reactos_arc_disk_info[i].ArcName); + ArcDiskInfo->ArcName = (PCHAR)PaToVa(ArcDiskInfo->ArcName); /* Mark partition table as valid */ ArcDiskInfo->ValidPartitionTable = TRUE; @@ -534,7 +531,6 @@ { MemoryDescriptor = CONTAINING_RECORD(NextMd, MEMORY_ALLOCATION_DESCRIPTOR, ListEntry); - DbgPrint((DPRINT_WINDOWS, "BP %08X PC %04X MT %d\n", MemoryDescriptor->BasePage, MemoryDescriptor->PageCount, MemoryDescriptor->MemoryType));
17 years
1
0
0
0
[dchapyshev] 31284: - Add some functionality - Small fixes and updates
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Sun Dec 16 23:02:17 2007 New Revision: 31284 URL:
http://svn.reactos.org/svn/reactos?rev=31284&view=rev
Log: - Add some functionality - Small fixes and updates Modified: trunk/reactos/dll/cpl/input/add.c trunk/reactos/dll/cpl/input/lang/bg-BG.rc trunk/reactos/dll/cpl/input/lang/de-DE.rc trunk/reactos/dll/cpl/input/lang/en-US.rc trunk/reactos/dll/cpl/input/lang/fr-FR.rc trunk/reactos/dll/cpl/input/lang/ru-RU.rc trunk/reactos/dll/cpl/input/lang/uk-UA.rc trunk/reactos/dll/cpl/input/resource.h trunk/reactos/dll/cpl/input/resources/information.ico trunk/reactos/dll/cpl/input/resources/keyboard.ico trunk/reactos/dll/cpl/input/resources/marker.ico trunk/reactos/dll/cpl/input/resources/microphone.ico trunk/reactos/dll/cpl/input/settings.c Modified: trunk/reactos/dll/cpl/input/add.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/add.c?rev=31…
============================================================================== --- trunk/reactos/dll/cpl/input/add.c (original) +++ trunk/reactos/dll/cpl/input/add.c Sun Dec 16 23:02:17 2007 @@ -95,36 +95,27 @@ VOID CreateLanguagesList(HWND hWnd) { - TCHAR LangSel[256]; + //TCHAR LangSel[256]; hLanguageList = hWnd; EnumSystemLocales(LanguagesEnumProc, LCID_INSTALLED); - LoadString(hApplet, - IDS_SELECTED_LANGUAGE, - LangSel, - 256); - - SendMessage(hLanguageList, + /*SendMessage(hLanguageList, CB_SELECTSTRING, (WPARAM) -1, - (LPARAM)LangSel); + (LPARAM)LangSel);*/ } static VOID SelectCurrentLayout(HWND hWnd) { - TCHAR Layout[256]; + //TCHAR Layout[256]; - LoadString(hApplet, - IDS_SELECTED_LAYOUT, - Layout, - 256); - SendMessage(hWnd, + /*SendMessage(hWnd, CB_SELECTSTRING, (WPARAM) -1, - (LPARAM)Layout); + (LPARAM)Layout);*/ } INT_PTR CALLBACK Modified: trunk/reactos/dll/cpl/input/lang/bg-BG.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/lang/bg-BG.r…
============================================================================== --- trunk/reactos/dll/cpl/input/lang/bg-BG.rc (original) +++ trunk/reactos/dll/cpl/input/lang/bg-BG.rc Sun Dec 16 23:02:17 2007 @@ -233,14 +233,19 @@ BEGIN IDS_CPLSYSTEMNAME "Ñëîâåñíè óñëóãè è åçèöè íà âúâåæäàíå" IDS_CPLSYSTEMDESCRIPTION "Íàãëàñÿâàíå íà íàñòðîéêèòå çà åçèöèòå íà âúâåæäàíå." + IDS_KEYBOARD "Keyboard" + IDS_ADV_TEXT_SRV "Advanced Text Services" + IDS_NONE "(None)" + IDS_UNKNOWN "(Unknown)" + IDS_RESTART "Do you want to restart your computer now?" + IDS_SPEECH "Speech" + IDS_HRD_REC "Handwriting Recognition" + IDS_OFF_ADV_TXT_SRV "Do you want to turn off advanced text services?" + IDS_WHATS_THIS "What's This?" END STRINGTABLE BEGIN - //Selected language on "&Äîáàâÿíå åçèê íà âúâåæäàíå" - IDS_SELECTED_LANGUAGE "English (United States)" - //Selected keyboard layout on "&Äîáàâÿíå åçèê íà âúâåæäàíå" - IDS_SELECTED_LAYOUT, "ÑÀÙ- Äâîðàê" IDS_US_LAYOUT, "ÑÀÙ" IDS_BELGIAN_LAYOUT, "Áåëãèéñêà (òî÷êà)" IDS_BELGIAN_FRENCH_LAYOUT, "Áåëãèéñêà çà ôðåíñêè" Modified: trunk/reactos/dll/cpl/input/lang/de-DE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/lang/de-DE.r…
============================================================================== --- trunk/reactos/dll/cpl/input/lang/de-DE.rc (original) +++ trunk/reactos/dll/cpl/input/lang/de-DE.rc Sun Dec 16 23:02:17 2007 @@ -233,14 +233,19 @@ BEGIN IDS_CPLSYSTEMNAME "Textdienste und Eingabesprachen" IDS_CPLSYSTEMDESCRIPTION "Ändert die Einstellungen der Texteingabe einer Sprache." + IDS_KEYBOARD "Keyboard" + IDS_ADV_TEXT_SRV "Advanced Text Services" + IDS_NONE "(None)" + IDS_UNKNOWN "(Unknown)" + IDS_RESTART "Do you want to restart your computer now?" + IDS_SPEECH "Speech" + IDS_HRD_REC "Handwriting Recognition" + IDS_OFF_ADV_TXT_SRV "Do you want to turn off advanced text services?" + IDS_WHATS_THIS "What's This?" END STRINGTABLE BEGIN - //Selected language on "Add Input language" - IDS_SELECTED_LANGUAGE "English (United States)" - //Selected keyboard layout on "Add Input language" - IDS_SELECTED_LAYOUT, "United States-Dvorak" IDS_US_LAYOUT, "US" IDS_BELGIAN_LAYOUT, "Belgisch (Punkt)" IDS_BELGIAN_FRENCH_LAYOUT, "Belgisch (Wallonisch)" Modified: trunk/reactos/dll/cpl/input/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/lang/en-US.r…
============================================================================== --- trunk/reactos/dll/cpl/input/lang/en-US.rc (original) +++ trunk/reactos/dll/cpl/input/lang/en-US.rc Sun Dec 16 23:02:17 2007 @@ -233,14 +233,19 @@ BEGIN IDS_CPLSYSTEMNAME "Text Services and Input Languages" IDS_CPLSYSTEMDESCRIPTION "Customizes settings for text input of languages." + IDS_KEYBOARD "Keyboard" + IDS_ADV_TEXT_SRV "Advanced Text Services" + IDS_NONE "(None)" + IDS_UNKNOWN "(Unknown)" + IDS_RESTART "Do you want to restart your computer now?" + IDS_SPEECH "Speech" + IDS_HRD_REC "Handwriting Recognition" + IDS_OFF_ADV_TXT_SRV "Do you want to turn off advanced text services?" + IDS_WHATS_THIS "What's This?" END STRINGTABLE BEGIN - //Selected language on "Add Input language" - IDS_SELECTED_LANGUAGE "English (United States)" - //Selected keyboard layout on "Add Input language" - IDS_SELECTED_LAYOUT, "United States-Dvorak" IDS_US_LAYOUT, "US" IDS_BELGIAN_LAYOUT, "Belgian (Period)" IDS_BELGIAN_FRENCH_LAYOUT, "Belgian French" Modified: trunk/reactos/dll/cpl/input/lang/fr-FR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/lang/fr-FR.r…
============================================================================== --- trunk/reactos/dll/cpl/input/lang/fr-FR.rc (original) +++ trunk/reactos/dll/cpl/input/lang/fr-FR.rc Sun Dec 16 23:02:17 2007 @@ -233,16 +233,21 @@ BEGIN IDS_CPLSYSTEMNAME "Services texte et langue de saisie" IDS_CPLSYSTEMDESCRIPTION "Personnalise les paramètres pour la langue de saisie de texte." + IDS_KEYBOARD "Keyboard" + IDS_ADV_TEXT_SRV "Advanced Text Services" + IDS_NONE "(None)" + IDS_UNKNOWN "(Unknown)" + IDS_RESTART "Do you want to restart your computer now?" + IDS_SPEECH "Speech" + IDS_HRD_REC "Handwriting Recognition" + IDS_OFF_ADV_TXT_SRV "Do you want to turn off advanced text services?" + IDS_WHATS_THIS "What's This?" END /* FIXME : To improve/complete */ /* FIXME : À améliorer/compléter */ STRINGTABLE BEGIN - //Selected language on "Add Input language" - IDS_SELECTED_LANGUAGE "Anglais (États-Unis)" - //Selected keyboard layout on "Add Input language" - IDS_SELECTED_LAYOUT, "États-Unis-Dvorak" IDS_US_LAYOUT, "US" IDS_BELGIAN_LAYOUT, "Belge (Period)" IDS_BELGIAN_FRENCH_LAYOUT, "Belge Français" Modified: trunk/reactos/dll/cpl/input/lang/ru-RU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/lang/ru-RU.r…
============================================================================== --- trunk/reactos/dll/cpl/input/lang/ru-RU.rc (original) +++ trunk/reactos/dll/cpl/input/lang/ru-RU.rc Sun Dec 16 23:02:17 2007 @@ -220,7 +220,7 @@ IDD_INPUT_LANG_PROP DIALOG 20, 20, 227, 75 STYLE DS_SETFONT | DS_MODALFRAME | DS_NOIDLEMSG | DS_3DLOOK | DS_CONTEXTHELP | WS_POPUPWINDOW | WS_VISIBLE | WS_CAPTION -CAPTION "Ñâîéñòâà ââîäà" +CAPTION "Ïàðàìåòðû ââîäà" FONT 8, "MS Shell Dlg" BEGIN LTEXT "ßçûê ââîäà:", -1, 7, 7, 61, 8 @@ -234,15 +234,20 @@ STRINGTABLE BEGIN IDS_CPLSYSTEMNAME "Òåêñòîâûå ñåðâèñû è ââîä ÿçûêîâ" - IDS_CPLSYSTEMDESCRIPTION "Äîïîëíèòåëüíûå óñòàíîâêè òåêñòîâîãî ââîäà ÿçûêîâ." + IDS_CPLSYSTEMDESCRIPTION "Äîïîëíèòåëüíûå ïàðàìåòðû òåêñòîâîãî ââîäà ÿçûêîâ." + IDS_KEYBOARD "Êëàâèàòóðà" + IDS_ADV_TEXT_SRV "Advanced Text Services" + IDS_NONE "(None)" + IDS_UNKNOWN "(Unknown)" + IDS_RESTART "Do you want to restart your computer now?" + IDS_SPEECH "Speech" + IDS_HRD_REC "Handwriting Recognition" + IDS_OFF_ADV_TXT_SRV "Do you want to turn off advanced text services?" + IDS_WHATS_THIS "What's This?" END STRINGTABLE BEGIN - //Selected language on "Add Input language" - IDS_SELECTED_LANGUAGE "English (United States)" - //Selected keyboard layout on "Add Input language" - IDS_SELECTED_LAYOUT, "United States-Dvorak" IDS_US_LAYOUT, "US" IDS_BELGIAN_LAYOUT, "Belgian (Period)" IDS_BELGIAN_FRENCH_LAYOUT, "Belgian French" Modified: trunk/reactos/dll/cpl/input/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/lang/uk-UA.r…
============================================================================== --- trunk/reactos/dll/cpl/input/lang/uk-UA.rc (original) +++ trunk/reactos/dll/cpl/input/lang/uk-UA.rc Sun Dec 16 23:02:17 2007 @@ -242,14 +242,19 @@ BEGIN IDS_CPLSYSTEMNAME "Ìîâè òà ñëóæáè òåêñòîâîãî ââîäó" IDS_CPLSYSTEMDESCRIPTION "Íàëàøòîâóº ïàðàìåòðè äëÿ òåêñòîâîãî ââîäó." + IDS_KEYBOARD "Keyboard" + IDS_ADV_TEXT_SRV "Advanced Text Services" + IDS_NONE "(None)" + IDS_UNKNOWN "(Unknown)" + IDS_RESTART "Do you want to restart your computer now?" + IDS_SPEECH "Speech" + IDS_HRD_REC "Handwriting Recognition" + IDS_OFF_ADV_TXT_SRV "Do you want to turn off advanced text services?" + IDS_WHATS_THIS "What's This?" END STRINGTABLE BEGIN - //Selected language on "Add Input language" ("Äîäàâàííÿ ìîâè ââîäó") - IDS_SELECTED_LANGUAGE "English (United States)" - //Selected keyboard layout on "Add Input language" ("Äîäàâàííÿ ìîâè ââîäó") - IDS_SELECTED_LAYOUT, "United States-Dvorak" IDS_US_LAYOUT, "ÑØÀ" IDS_BELGIAN_LAYOUT, "Áåëüã³éñüêà (³ç êðàïêîþ)" IDS_BELGIAN_FRENCH_LAYOUT, "Ôðàíöóçüêà (Áåëüã³ÿ)" Modified: trunk/reactos/dll/cpl/input/resource.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/resource.h?r…
============================================================================== --- trunk/reactos/dll/cpl/input/resource.h (original) +++ trunk/reactos/dll/cpl/input/resource.h Sun Dec 16 23:02:17 2007 @@ -79,7 +79,16 @@ /* IDS */ #define IDS_CPLSYSTEMNAME 1 #define IDS_CPLSYSTEMDESCRIPTION 2 - +#define IDS_KEYBOARD 3 +#define IDS_ADV_TEXT_SRV 4 +#define IDS_NONE 5 +#define IDS_UNKNOWN 6 +#define IDS_RESTART 7 +#define IDS_SPEECH 8 +#define IDS_HRD_REC 9 +#define IDS_OFF_ADV_TXT_SRV 10 +#define IDS_WHATS_THIS 11 +/* Layouts */ #define IDS_US_LAYOUT 5000 #define IDS_BELGIAN_LAYOUT 5001 #define IDS_BELGIAN_FRENCH_LAYOUT 5002 @@ -213,9 +222,6 @@ #define IDS_BULGARIAN_PHONETIC_CLASSIC_LAYOUT 5134 #define IDS_BULGARIAN_PHONETIC_BDS_LAYOUT 5135 -#define IDS_SELECTED_LAYOUT 6000 -#define IDS_SELECTED_LANGUAGE 6001 - #endif /* __CPL_RESOURCE_H */ /* EOF */ Modified: trunk/reactos/dll/cpl/input/resources/information.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/resources/in…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/cpl/input/resources/keyboard.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/resources/ke…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/cpl/input/resources/marker.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/resources/ma…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/cpl/input/resources/microphone.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/resources/mi…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/cpl/input/settings.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/settings.c?r…
============================================================================== --- trunk/reactos/dll/cpl/input/settings.c (original) +++ trunk/reactos/dll/cpl/input/settings.c Sun Dec 16 23:02:17 2007 @@ -39,27 +39,120 @@ #include "resource.h" #include "input.h" -#define BUFSIZE 80 - -static -BOOL -CreateDefaultLangList(HWND hWnd) +#define BUFSIZE 256 + +static BOOL +GetLayoutName(LPCTSTR lcid, LPCTSTR name) { HKEY hKey; - TCHAR szPreload[BUFSIZE]; - TCHAR szCount[BUFSIZE]; - TCHAR Lang[BUFSIZE]; DWORD dwBufLen; - DWORD dwBufCLen; - DWORD cValues; - LONG lRet; + TCHAR szBuf[BUFSIZE]; + + _stprintf(szBuf, L"SYSTEM\\ControlSet001\\Control\\Keyboard Layouts\\%s",lcid); + + if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, (LPCTSTR)szBuf, 0, KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS) + { + dwBufLen = BUFSIZE; + if (RegQueryValueEx(hKey,L"Layout Text",NULL,NULL,(LPBYTE)name,&dwBufLen) == ERROR_SUCCESS) + { + RegCloseKey(hKey); + return TRUE; + } + } + + return FALSE; +} + +static BOOL +TreeView_GetItemText(HWND hTree, HTREEITEM hItem, LPTSTR name, DWORD buf) +{ + TVITEM tv = {0}; + + tv.mask = TVIF_TEXT | TVIF_HANDLE; + tv.hItem = hItem; + tv.pszText = name; + tv.cchTextMax = (int)buf; + + return TreeView_GetItem(hTree, &tv); +} + +static HTREEITEM +GetRootHandle(HWND hWnd, TCHAR * Name) +{ + HTREEITEM hNext = 0, hRoot; + TCHAR Tmp[256]; + HWND hTree; + DWORD i, count; + HKEY hKey; + + hTree = GetDlgItem(hWnd, IDC_KEYLAYOUT_TREE); + hRoot = TreeView_GetRoot(hTree); + + RegOpenKeyEx(HKEY_CURRENT_USER, L"Keyboard Layout\\Preload", 0, KEY_QUERY_VALUE, &hKey); + RegQueryInfoKey(hKey,NULL,NULL,NULL,NULL,NULL,NULL,&count,NULL,NULL,NULL,NULL); + RegCloseKey(hKey); + + for (i = 0; i < count; i++) + { + if (i == 0) + { + (VOID) TreeView_GetItemText(hTree, hRoot, (LPTSTR)Tmp, 256); + } + else + { + if (i == 1) + { + hNext = TreeView_GetNextItem(hTree, hRoot, TVGN_NEXT); + } + else + { + hNext = TreeView_GetNextItem(hTree, hNext, TVGN_NEXT); + } + (VOID) TreeView_GetItemText(hTree, hNext, (LPTSTR)Tmp, 256); + } + + if (_tcscmp(Name,Tmp) == 0) + { + if (i == 0) return hRoot; + return hNext; + } + } + return 0; +} + +static BOOL +InitDefaultLangList(HWND hWnd) +{ + HKEY hKey, hSubKey; + TCHAR szPreload[BUFSIZE], szCount[BUFSIZE], szSub[BUFSIZE]; + TCHAR szName[BUFSIZE], Lang[BUFSIZE]; + DWORD dwBufLen, dwBufCLen, cValues; INT Count; LCID Lcid; - - if (RegOpenKeyEx(HKEY_CURRENT_USER, TEXT("Keyboard Layout\\Preload"), 0, KEY_QUERY_VALUE, &hKey) != ERROR_SUCCESS) - { + TV_INSERTSTRUCT inc; + HWND TWwnd; + int Index[3]; + HIMAGELIST hImgList; + HICON hIcon; + + ZeroMemory(&inc, sizeof(TV_INSERTSTRUCT)); + inc.hInsertAfter = TVI_LAST; + inc.item.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_STATE; + inc.hParent = TVI_ROOT; + + hImgList = ImageList_Create(16,16,ILC_COLOR8 | ILC_MASK,5,5); + hIcon = LoadImage(hApplet,MAKEINTRESOURCE(IDI_KEYBOARD_ICO),IMAGE_ICON,16,16,LR_DEFAULTCOLOR); + Index[0] = ImageList_AddIcon(hImgList,hIcon); + hIcon = LoadImage(hApplet,MAKEINTRESOURCE(IDI_MARKER_ICO),IMAGE_ICON,16,16,LR_DEFAULTCOLOR); + Index[1] = ImageList_AddIcon(hImgList,hIcon); + hIcon = LoadImage(hApplet,MAKEINTRESOURCE(IDI_INFO_ICO),IMAGE_ICON,16,16,LR_DEFAULTCOLOR); + Index[2] = ImageList_AddIcon(hImgList,hIcon); + DestroyIcon(hIcon); + + TWwnd = GetDlgItem(hWnd, IDC_KEYLAYOUT_TREE); + + if (RegOpenKeyEx(HKEY_CURRENT_USER, L"Keyboard Layout\\Preload", 0, KEY_QUERY_VALUE, &hKey) != ERROR_SUCCESS) return FALSE; - } RegQueryInfoKey(hKey,NULL,NULL,NULL,NULL,NULL,NULL,&cValues,NULL,NULL,NULL,NULL); @@ -67,32 +160,98 @@ { for (Count = 0; Count < cValues; Count++) { - szCount[0] = TEXT('\0'); + szCount[0] = L'\0'; dwBufCLen = BUFSIZE; - lRet = RegEnumValue(hKey,Count,(LPTSTR)szCount,&dwBufCLen,NULL,NULL,NULL,NULL); - - _stprintf(szCount,TEXT("%d"),Count + 1); + RegEnumValue(hKey,Count,(LPTSTR)szCount,&dwBufCLen,NULL,NULL,NULL,NULL); + + _stprintf(szCount,L"%d",Count + 1); dwBufLen = BUFSIZE; RegQueryValueEx(hKey,(LPTSTR)szCount,NULL,NULL,(LPBYTE)szPreload,&dwBufLen); Lcid = _tcstoul(szPreload, NULL, 16); + /* FIXME: If it is established more than one English layouts of the keyboard it is incorrectly determined Lang */ GetLocaleInfo(Lcid, LOCALE_SLANGUAGE, (LPTSTR)Lang, sizeof(Lang)); - SendMessage(hWnd, - CB_ADDSTRING, - 0, - (LPARAM)Lang); + if (RegOpenKeyEx(HKEY_CURRENT_USER, L"Keyboard Layout\\Substitutes", 0, KEY_QUERY_VALUE, &hSubKey) != ERROR_SUCCESS) + return FALSE; + + dwBufLen = BUFSIZE; + TCHAR szLOName[BUFSIZE], szBuf[BUFSIZE]; + LONG Ret; + HTREEITEM hRoot = 0, hKeyBrd = 0, hParent; + + Ret = RegQueryValueEx(hSubKey,(LPCTSTR)szPreload,NULL,NULL,(LPBYTE)szSub,&dwBufLen); + if (Ret == ERROR_SUCCESS) _tcscpy(szPreload, szSub); + + GetLayoutName(szPreload,szLOName); + + hParent = GetRootHandle(hWnd, Lang); + if (hParent == 0) + { + inc.hParent = NULL; + inc.item.pszText = Lang; + inc.item.iImage = Index[2]; + inc.item.iSelectedImage = Index[2]; + if (Count == 0) + { + inc.item.state = TVIS_BOLD; + inc.item.stateMask = TVIS_BOLD; + } + else + { + inc.item.state = !TVIS_BOLD; + inc.item.stateMask = !TVIS_BOLD; + } + hRoot = TreeView_InsertItem(TWwnd, &inc); + if (Count == 0) (VOID) TreeView_SelectItem(TWwnd, hRoot); + + LoadString(hApplet, IDS_KEYBOARD, (LPTSTR)szBuf, BUFSIZE); + inc.hParent = hRoot; + inc.item.pszText = szBuf; + inc.item.iImage = Index[0]; + inc.item.iSelectedImage = Index[0]; + inc.item.state = !TVIS_BOLD; + inc.item.stateMask = !TVIS_BOLD; + hKeyBrd = TreeView_InsertItem(TWwnd, &inc); + inc.hParent = hKeyBrd; + } + else + { + inc.hParent = TreeView_GetChild(TWwnd, hParent); + } + + inc.item.pszText = szLOName; + inc.item.iImage = Index[1]; + inc.item.iSelectedImage = Index[1]; if (Count == 0) { - SendMessage(hWnd, - CB_SELECTSTRING, - (WPARAM)-1, - (LPARAM)Lang); - } - } - + inc.item.state = TVIS_BOLD; + inc.item.stateMask = TVIS_BOLD; + } + else + { + inc.item.state = !TVIS_BOLD; + inc.item.stateMask = !TVIS_BOLD; + } + (VOID) TreeView_InsertItem(TWwnd, &inc); + + (VOID) TreeView_SetImageList(TWwnd, hImgList, TVSIL_NORMAL); + (VOID) TreeView_Expand(TWwnd, hRoot, TVM_EXPAND); + (VOID) TreeView_Expand(TWwnd, hKeyBrd, TVM_EXPAND); + + _stprintf(szName,L"%s - %s",Lang,szLOName); + + RegCloseKey(hSubKey); + + HWND CBwnd; + CBwnd = GetDlgItem(hWnd, IDC_DEFAULT_INPUT_LANG); + SendMessage(CBwnd,CB_ADDSTRING,0,(LPARAM)szName); + SendMessage(CBwnd,CB_SETITEMDATA,0,(LPARAM)Lcid); + if (Count == 0) + SendMessage(CBwnd,CB_SELECTSTRING,(WPARAM)-1,(LPARAM)szName); + } } RegCloseKey(hKey); @@ -109,7 +268,7 @@ switch (uMsg) { case WM_INITDIALOG: - CreateDefaultLangList(GetDlgItem(hwndDlg, IDC_DEFAULT_INPUT_LANG)); + InitDefaultLangList(hwndDlg); break; case WM_COMMAND:
17 years
1
0
0
0
[fireball] 31283: - A bit of cleanup (no code change).
by fireball@svn.reactos.org
Author: fireball Date: Sun Dec 16 20:23:38 2007 New Revision: 31283 URL:
http://svn.reactos.org/svn/reactos?rev=31283&view=rev
Log: - A bit of cleanup (no code change). Modified: trunk/reactos/ntoskrnl/config/cmdelay.c trunk/reactos/ntoskrnl/config/cmkcbncb.c trunk/reactos/ntoskrnl/config/cmmapvw.c Modified: trunk/reactos/ntoskrnl/config/cmdelay.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmdelay.c?…
============================================================================== --- trunk/reactos/ntoskrnl/config/cmdelay.c (original) +++ trunk/reactos/ntoskrnl/config/cmdelay.c Sun Dec 16 20:23:38 2007 @@ -346,4 +346,3 @@ /* Set new delay size and remove the delete flag */ Kcb->DelayedCloseIndex = CmpDelayedCloseSize; } - Modified: trunk/reactos/ntoskrnl/config/cmkcbncb.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmkcbncb.c…
============================================================================== --- trunk/reactos/ntoskrnl/config/cmkcbncb.c (original) +++ trunk/reactos/ntoskrnl/config/cmkcbncb.c Sun Dec 16 20:23:38 2007 @@ -925,8 +925,8 @@ if (!(Flags & CMP_ENLIST_KCB_LOCKED_EXCLUSIVE)) { /* Acquire the lock */ - CmpAcquireKcbLockExclusive(KeyBody->KeyControlBlock); - } + CmpAcquireKcbLockExclusive(KeyBody->KeyControlBlock); + } /* Make sure we have the exclusive lock */ ASSERT((CmpIsKcbLockedExclusive(KeyBody->KeyControlBlock) == TRUE) || @@ -941,7 +941,7 @@ CMP_ENLIST_KCB_LOCKED_EXCLUSIVE))) { /* Release the lock */ - CmpReleaseKcbLock(KeyBody->KeyControlBlock); + CmpReleaseKcbLock(KeyBody->KeyControlBlock); } } @@ -974,7 +974,7 @@ ASSERT(IsListEmpty(&KeyBody->KeyBodyList) == FALSE); /* Lock the KCB */ - if (!LockHeld) CmpAcquireKcbLockExclusive(KeyBody->KeyControlBlock); + if (!LockHeld) CmpAcquireKcbLockExclusive(KeyBody->KeyControlBlock); ASSERT((CmpIsKcbLockedExclusive(KeyBody->KeyControlBlock) == TRUE) || (CmpTestRegistryLockExclusive() == TRUE)); @@ -982,7 +982,5 @@ RemoveEntryList(&KeyBody->KeyBodyList); /* Unlock it it if we did a manual lock */ - if (!LockHeld) CmpReleaseKcbLock(KeyBody->KeyControlBlock); -} - - + if (!LockHeld) CmpReleaseKcbLock(KeyBody->KeyControlBlock); +} Modified: trunk/reactos/ntoskrnl/config/cmmapvw.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmmapvw.c?…
============================================================================== --- trunk/reactos/ntoskrnl/config/cmmapvw.c (original) +++ trunk/reactos/ntoskrnl/config/cmmapvw.c Sun Dec 16 20:23:38 2007 @@ -29,4 +29,3 @@ Hive->PinnedViews = 0; Hive->UseCount = 0; } -
17 years
1
0
0
0
[fireball] 31282: - Add a signature field to KCBs, and use it to validate KCBs as well as to mark them dead after they've been freed (to catch invalid reuse). - Add assertions to make sure key hashes are valid. - Finish implementing EnlistKeyBodyWithKCB since the new parse routine is now used, and implement analogous DelistKeyBodyFromKCB. - Fix delay item allocation code which was overwriting pool memory. - Re-enable allocation-page support for allocating KCBs. - Implement the CmpDelayDerefKCBWo
by fireball@svn.reactos.org
Author: fireball Date: Sun Dec 16 19:37:15 2007 New Revision: 31282 URL:
http://svn.reactos.org/svn/reactos?rev=31282&view=rev
Log: - Add a signature field to KCBs, and use it to validate KCBs as well as to mark them dead after they've been freed (to catch invalid reuse). - Add assertions to make sure key hashes are valid. - Finish implementing EnlistKeyBodyWithKCB since the new parse routine is now used, and implement analogous DelistKeyBodyFromKCB. - Fix delay item allocation code which was overwriting pool memory. - Re-enable allocation-page support for allocating KCBs. - Implement the CmpDelayDerefKCBWorker now that delay alloc/free works. - Fix CmpDelayDerefKeyControlBlock which was overwriting KCB flags and incorrectly setting reference counts for the KCB. - CmpDelayCloseWorkItemActive should be enabled when arming the delayed close timer. - Fix reference counting bugs in CmpAddToDelayedClose and CmpRemoveFromDelayedClose. - Fix wrong sizes of CM_KCBS_PER_PAGE and CM_DELAYS_PER_PAGE which caused more pool overwrites. Modified: trunk/reactos/ntoskrnl/config/cmalloc.c trunk/reactos/ntoskrnl/config/cmdelay.c trunk/reactos/ntoskrnl/config/cmkcbncb.c trunk/reactos/ntoskrnl/config/cmsysini.c trunk/reactos/ntoskrnl/include/internal/cm.h trunk/reactos/ntoskrnl/include/internal/cm_x.h Modified: trunk/reactos/ntoskrnl/config/cmalloc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmalloc.c?…
============================================================================== --- trunk/reactos/ntoskrnl/config/cmalloc.c (original) +++ trunk/reactos/ntoskrnl/config/cmalloc.c Sun Dec 16 19:37:15 2007 @@ -55,7 +55,7 @@ PAGED_CODE(); /* Sanity checks */ - ASSERT(IsListEmpty(&(Kcb->KeyBodyListHead)) == TRUE); + ASSERT(IsListEmpty(&Kcb->KeyBodyListHead) == TRUE); for (i = 0; i < 4; i++) ASSERT(Kcb->KeyBodyArray[i] == NULL); /* Check if it wasn't privately allocated */ @@ -87,12 +87,12 @@ if (++AllocPage->FreeCount == CM_KCBS_PER_PAGE) { /* Loop all the entries */ - for (i = CM_KCBS_PER_PAGE; i; i--) + for (i = 0; i < CM_KCBS_PER_PAGE; i++) { /* Get the KCB */ Kcb = (PVOID)((ULONG_PTR)AllocPage + FIELD_OFFSET(CM_ALLOC_PAGE, AllocPage) + - (i - 1) * sizeof(CM_KEY_CONTROL_BLOCK)); + i * sizeof(CM_KEY_CONTROL_BLOCK)); /* Remove the entry */ RemoveEntryList(&Kcb->FreeListEntry); @@ -117,7 +117,7 @@ PAGED_CODE(); /* Check if private allocations are initialized */ - if (FALSE) + if (CmpAllocInited) { /* They are, acquire the bucket lock */ KeAcquireGuardedMutex(&CmpAllocBucketLock); @@ -208,28 +208,28 @@ /* Look for an item on the free list */ SearchList: - if (!IsListEmpty(&CmpFreeDelayItemsListHead)) - { - /* Get the current entry in the list */ - NextEntry = RemoveHeadList(&CmpFreeDelayItemsListHead); - - /* Grab the item */ - Entry = CONTAINING_RECORD(NextEntry, CM_DELAY_ALLOC, ListEntry); - - /* Clear the list */ - Entry->ListEntry.Flink = Entry->ListEntry.Blink = NULL; - - /* Grab the alloc page */ - AllocPage = (PCM_ALLOC_PAGE)((ULONG_PTR)Entry & 0xFFFFF000); - - /* Decrease free entries */ - ASSERT(AllocPage->FreeCount != 0); - AllocPage->FreeCount--; - - /* Release the lock */ - KeReleaseGuardedMutex(&CmpDelayAllocBucketLock); - return Entry; - } + if (!IsListEmpty(&CmpFreeDelayItemsListHead)) + { + /* Get the current entry in the list */ + NextEntry = RemoveHeadList(&CmpFreeDelayItemsListHead); + + /* Grab the item */ + Entry = CONTAINING_RECORD(NextEntry, CM_DELAY_ALLOC, ListEntry); + + /* Clear the list */ + Entry->ListEntry.Flink = Entry->ListEntry.Blink = NULL; + + /* Grab the alloc page */ + AllocPage = (PCM_ALLOC_PAGE)((ULONG_PTR)Entry & 0xFFFFF000); + + /* Decrease free entries */ + ASSERT(AllocPage->FreeCount != 0); + AllocPage->FreeCount--; + + /* Release the lock */ + KeReleaseGuardedMutex(&CmpDelayAllocBucketLock); + return Entry; + } /* Allocate an allocation page */ AllocPage = ExAllocatePoolWithTag(PagedPool, PAGE_SIZE, TAG_CM); Modified: trunk/reactos/ntoskrnl/config/cmdelay.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmdelay.c?…
============================================================================== --- trunk/reactos/ntoskrnl/config/cmdelay.c (original) +++ trunk/reactos/ntoskrnl/config/cmdelay.c Sun Dec 16 19:37:15 2007 @@ -100,15 +100,41 @@ NTAPI CmpDelayDerefKCBWorker(IN PVOID Context) { + PCM_DELAY_DEREF_KCB_ITEM Entry; PAGED_CODE(); /* Sanity check */ ASSERT(CmpDelayDerefKCBWorkItemActive); - /* FIXME: TODO */ - DPRINT1("CmpDelayDerefKCBWorker has work to do!\n"); - return; - ASSERT(FALSE); + /* Lock the registry and and list lock */ + CmpLockRegistry(); + KeAcquireGuardedMutex(&CmpDelayDerefKCBLock); + + /* Check if the list is empty */ + while (!IsListEmpty(&CmpDelayDerefKCBListHead)) + { + /* Grab an entry */ + Entry = (PVOID)RemoveHeadList(&CmpDelayDerefKCBListHead); + + /* We can release the lock now */ + KeReleaseGuardedMutex(&CmpDelayDerefKCBLock); + + /* Now grab the actual entry */ + Entry = CONTAINING_RECORD(Entry, CM_DELAY_DEREF_KCB_ITEM, ListEntry); + Entry->ListEntry.Flink = Entry->ListEntry.Blink = NULL; + + /* Dereference and free */ + CmpDereferenceKeyControlBlock(Entry->Kcb); + CmpFreeDelayItem(Entry); + + /* Lock the list again */ + KeAcquireGuardedMutex(&CmpDelayDerefKCBLock); + } + + /* We're done */ + CmpDelayDerefKCBWorkItemActive = FALSE; + KeReleaseGuardedMutex(&CmpDelayDerefKCBLock); + CmpUnlockRegistry(); } VOID @@ -133,19 +159,22 @@ NTAPI CmpDelayDerefKeyControlBlock(IN PCM_KEY_CONTROL_BLOCK Kcb) { - USHORT OldRefCount, NewRefCount; + LONG OldRefCount, NewRefCount; LARGE_INTEGER Timeout; PCM_DELAY_DEREF_KCB_ITEM Entry; PAGED_CODE(); /* Get the previous reference count */ - OldRefCount = Kcb->RefCount; - - /* Write the new one */ - NewRefCount = (USHORT)InterlockedCompareExchange((PLONG)&Kcb->RefCount, - OldRefCount - 1, - OldRefCount); - if (NewRefCount != OldRefCount) return; + OldRefCount = *(PLONG)&Kcb->RefCount; + NewRefCount = OldRefCount - 1; + if (((NewRefCount & 0xFFFF) > 0) && + (InterlockedCompareExchange((PLONG)&Kcb->RefCount, + NewRefCount, + OldRefCount) == OldRefCount)) + { + /* KCB still had references, so we're done */ + return; + } /* Allocate a delay item */ Entry = CmpAllocateDelayItem(); @@ -179,6 +208,9 @@ { LARGE_INTEGER Timeout; PAGED_CODE(); + + /* Set the worker active */ + CmpDelayCloseWorkItemActive = TRUE; /* Setup the interval */ Timeout.QuadPart = CmpDelayCloseIntervalInSeconds * -10000000; @@ -220,14 +252,18 @@ if (Kcb->InDelayClose) ASSERT(FALSE); /* Get the previous reference count */ - OldRefCount = Kcb->InDelayClose; + OldRefCount = *(PLONG)&Kcb->InDelayClose; ASSERT(OldRefCount == 0); /* Write the new one */ - NewRefCount = InterlockedCompareExchange((PLONG)&Kcb->InDelayClose, - 1, - OldRefCount); - if (NewRefCount != OldRefCount) ASSERT(FALSE); + NewRefCount = 1; + if (InterlockedCompareExchange((PLONG)&Kcb->InDelayClose, + NewRefCount, + OldRefCount) != OldRefCount) + { + /* Sanity check */ + ASSERT(FALSE); + } /* Reset the delayed close index */ Kcb->DelayedCloseIndex = 0; @@ -290,15 +326,19 @@ /* Sanity check */ if (!Kcb->InDelayClose) ASSERT(FALSE); - /* Get the old reference count */ - OldRefCount = Kcb->InDelayClose; + /* Get the previous reference count */ + OldRefCount = *(PLONG)&Kcb->InDelayClose; ASSERT(OldRefCount == 1); - /* Set it to 0 */ - NewRefCount = InterlockedCompareExchange((PLONG)&Kcb->InDelayClose, - 0, - OldRefCount); - if (NewRefCount != OldRefCount) ASSERT(FALSE); + /* Write the new one */ + NewRefCount = 0; + if (InterlockedCompareExchange((PLONG)&Kcb->InDelayClose, + NewRefCount, + OldRefCount) != OldRefCount) + { + /* Sanity check */ + ASSERT(FALSE); + } /* Remove the link to the entry */ Kcb->DelayCloseEntry = NULL; @@ -307,5 +347,3 @@ Kcb->DelayedCloseIndex = CmpDelayedCloseSize; } - - Modified: trunk/reactos/ntoskrnl/config/cmkcbncb.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmkcbncb.c…
============================================================================== --- trunk/reactos/ntoskrnl/config/cmkcbncb.c (original) +++ trunk/reactos/ntoskrnl/config/cmkcbncb.c Sun Dec 16 19:37:15 2007 @@ -80,6 +80,7 @@ { PCM_KEY_HASH *Prev; PCM_KEY_HASH Current; + ASSERT_VALID_HASH(KeyHash); /* Lookup all the keys in this index entry */ Prev = &GET_HASH_ENTRY(CmpCacheTable, KeyHash->ConvKey).Entry; @@ -88,12 +89,14 @@ /* Save the current one and make sure it's valid */ Current = *Prev; ASSERT(Current != NULL); + ASSERT_VALID_HASH(Current); /* Check if it matches */ if (Current == KeyHash) { /* Then write the previous one */ *Prev = Current->NextHash; + if (*Prev) ASSERT_VALID_HASH(*Prev); break; } @@ -109,6 +112,7 @@ { ULONG i; PCM_KEY_HASH Entry; + ASSERT_VALID_HASH(KeyHash); /* Get the hash index */ i = GET_HASH_INDEX(KeyHash->ConvKey); @@ -121,6 +125,7 @@ while (Entry) { /* Check if this matches */ + ASSERT_VALID_HASH(Entry); if ((KeyHash->ConvKey == Entry->ConvKey) && (KeyHash->KeyCell == Entry->KeyCell) && (KeyHash->KeyHive == Entry->KeyHive)) @@ -488,6 +493,9 @@ Parent = Kcb->ParentKcb; if (!Kcb->Delete) CmpRemoveKeyControlBlock(Kcb); + /* Set invalid KCB signature */ + Kcb->Signature = CM_KCB_INVALID_SIGNATURE; + /* Free the KCB as well */ CmpFreeKeyControlBlock(Kcb); @@ -595,12 +603,15 @@ IN BOOLEAN LockHeldExclusively) { /* Sanity check */ - ASSERT((CmpIsKcbLockedExclusive(Kcb) == TRUE) || - (CmpTestRegistryLockExclusive() == TRUE)); + ASSERT_KCB_VALID(Kcb); /* Check if this is the last reference */ if ((InterlockedDecrement((PLONG)&Kcb->RefCount) & 0xFFFF) == 0) { + /* Sanity check */ + ASSERT((CmpIsKcbLockedExclusive(Kcb) == TRUE) || + (CmpTestRegistryLockExclusive() == TRUE)); + /* Check if we should do a direct delete */ if (((CmpHoldLazyFlush) && !(Kcb->ExtFlags & CM_KCB_SYM_LINK_FOUND) && @@ -699,6 +710,7 @@ InitializeKCBKeyBodyList(Kcb); /* Set it up */ + Kcb->Signature = CM_KCB_SIGNATURE; Kcb->Delete = FALSE; Kcb->RefCount = 1; Kcb->KeyHive = Hive; @@ -706,6 +718,7 @@ Kcb->ConvKey = ConvKey; Kcb->DelayedCloseIndex = CmpDelayedCloseSize; Kcb->InDelayClose = 0; + ASSERT_KCB_VALID(Kcb); /* Check if we have two hash entires */ HashLock = Flags & CMP_LOCK_HASHES_FOR_KCB ? TRUE : FALSE; @@ -730,9 +743,11 @@ { /* Sanity check */ ASSERT(!FoundKcb->Delete); + Kcb->Signature = CM_KCB_INVALID_SIGNATURE; /* Free the one we allocated and reference this one */ CmpFreeKeyControlBlock(Kcb); + ASSERT_KCB_VALID(FoundKcb); Kcb = FoundKcb; if (!CmpReferenceKeyControlBlock(Kcb)) { @@ -790,6 +805,7 @@ { /* Remove the KCB and free it */ CmpRemoveKeyControlBlock(Kcb); + Kcb->Signature = CM_KCB_INVALID_SIGNATURE; CmpFreeKeyControlBlock(Kcb); Kcb = NULL; } @@ -833,12 +849,20 @@ /* Remove the KCB and free it */ CmpRemoveKeyControlBlock(Kcb); + Kcb->Signature = CM_KCB_INVALID_SIGNATURE; CmpFreeKeyControlBlock(Kcb); Kcb = NULL; } } } + /* Check if this is a KCB inside a frozen hive */ + if ((Kcb) && (((PCMHIVE)Hive)->Frozen) && (!(Kcb->Flags & KEY_SYM_LINK))) + { + /* Don't add these to the delay close */ + Kcb->ExtFlags |= CM_KCB_NO_DELAY_CLOSE; + } + /* Sanity check */ ASSERT((!Kcb) || (Kcb->Delete == FALSE)); @@ -867,12 +891,98 @@ EnlistKeyBodyWithKCB(IN PCM_KEY_BODY KeyBody, IN ULONG Flags) { + ULONG i; + /* Sanity check */ ASSERT(KeyBody->KeyControlBlock != NULL); /* Initialize the list entry */ InitializeListHead(&KeyBody->KeyBodyList); - /* FIXME: Implement once we don't link parents to children anymore */ -} - + /* Check if we can use the parent KCB array */ + for (i = 0; i < 4; i++) + { + /* Add it into the list */ + if (!InterlockedCompareExchangePointer(&KeyBody->KeyControlBlock-> + KeyBodyArray[i], + KeyBody, + NULL)) + { + /* Added */ + return; + } + } + + /* Array full, check if we need to unlock the KCB */ + if (Flags & CMP_ENLIST_KCB_LOCKED_SHARED) + { + /* It's shared, so release the KCB shared lock */ + CmpReleaseKcbLock(KeyBody->KeyControlBlock); + ASSERT(!(Flags & CMP_ENLIST_KCB_LOCKED_EXCLUSIVE)); + } + + /* Check if we need to lock the KCB */ + if (!(Flags & CMP_ENLIST_KCB_LOCKED_EXCLUSIVE)) + { + /* Acquire the lock */ + CmpAcquireKcbLockExclusive(KeyBody->KeyControlBlock); + } + + /* Make sure we have the exclusive lock */ + ASSERT((CmpIsKcbLockedExclusive(KeyBody->KeyControlBlock) == TRUE) || + (CmpTestRegistryLockExclusive() == TRUE)); + + /* do the insert */ + InsertTailList(&KeyBody->KeyControlBlock->KeyBodyListHead, + &KeyBody->KeyBodyList); + + /* Check if we did a manual lock */ + if (!(Flags & (CMP_ENLIST_KCB_LOCKED_SHARED | + CMP_ENLIST_KCB_LOCKED_EXCLUSIVE))) + { + /* Release the lock */ + CmpReleaseKcbLock(KeyBody->KeyControlBlock); + } +} + +VOID +NTAPI +DelistKeyBodyFromKCB(IN PCM_KEY_BODY KeyBody, + IN BOOLEAN LockHeld) +{ + ULONG i; + + /* Sanity check */ + ASSERT(KeyBody->KeyControlBlock != NULL); + + /* Check if we can use the parent KCB array */ + for (i = 0; i < 4; i++) + { + /* Add it into the list */ + if (InterlockedCompareExchangePointer(&KeyBody->KeyControlBlock-> + KeyBodyArray[i], + NULL, + KeyBody) == KeyBody) + { + /* Removed */ + return; + } + } + + /* Sanity checks */ + ASSERT(IsListEmpty(&KeyBody->KeyControlBlock->KeyBodyListHead) == FALSE); + ASSERT(IsListEmpty(&KeyBody->KeyBodyList) == FALSE); + + /* Lock the KCB */ + if (!LockHeld) CmpAcquireKcbLockExclusive(KeyBody->KeyControlBlock); + ASSERT((CmpIsKcbLockedExclusive(KeyBody->KeyControlBlock) == TRUE) || + (CmpTestRegistryLockExclusive() == TRUE)); + + /* Remove the entry */ + RemoveEntryList(&KeyBody->KeyBodyList); + + /* Unlock it it if we did a manual lock */ + if (!LockHeld) CmpReleaseKcbLock(KeyBody->KeyControlBlock); +} + + Modified: trunk/reactos/ntoskrnl/config/cmsysini.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmsysini.c…
============================================================================== --- trunk/reactos/ntoskrnl/config/cmsysini.c (original) +++ trunk/reactos/ntoskrnl/config/cmsysini.c Sun Dec 16 19:37:15 2007 @@ -66,8 +66,8 @@ Kcb = KeyBody->KeyControlBlock; if (Kcb) { - /* Delist the key (once new parse routines are used) */ - //DelistKeyBodyFromKCB(KeyBody, FALSE); + /* Delist the key */ + DelistKeyBodyFromKCB(KeyBody, FALSE); } /* Dereference the KCB */ Modified: trunk/reactos/ntoskrnl/include/internal/cm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/cm.h (original) +++ trunk/reactos/ntoskrnl/include/internal/cm.h Sun Dec 16 19:37:15 2007 @@ -36,12 +36,17 @@ #define CMTRACE(x, ...) DPRINT(__VA_ARGS__) #endif - // // Hack since bigkeys are not yet supported // #define ASSERT_VALUE_BIG(h, s) \ ASSERTMSG("Big keys not supported!", !CmpIsKeyValueBig(h, s)); + +// +// CM_KEY_CONTROL_BLOCK Signatures +// +#define CM_KCB_SIGNATURE TAG('C', 'm', 'K', 'b') +#define CM_KCB_INVALID_SIGNATURE TAG('C', 'm', 'F', '4') // // CM_KEY_CONTROL_BLOCK Flags @@ -81,6 +86,12 @@ #define CMP_LOCK_HASHES_FOR_KCB 0x2 // +// EnlistKeyBodyWithKCB Flags +// +#define CMP_ENLIST_KCB_LOCKED_SHARED 0x1 +#define CMP_ENLIST_KCB_LOCKED_EXCLUSIVE 0x2 + +// // Maximum size of Value Cache // #define MAXIMUM_CACHED_DATA 2 * PAGE_SIZE @@ -94,9 +105,9 @@ // Number of items that can fit inside an Allocation Page // #define CM_KCBS_PER_PAGE \ - PAGE_SIZE / sizeof(CM_KEY_CONTROL_BLOCK) + ((PAGE_SIZE - FIELD_OFFSET(CM_ALLOC_PAGE, AllocPage)) / sizeof(CM_KEY_CONTROL_BLOCK)) #define CM_DELAYS_PER_PAGE \ - PAGE_SIZE / sizeof(CM_DELAYED_CLOSE_ENTRY) + ((PAGE_SIZE - FIELD_OFFSET(CM_ALLOC_PAGE, AllocPage)) / sizeof(CM_DELAY_ALLOC)) // // Value Search Results @@ -229,6 +240,7 @@ // typedef struct _CM_KEY_CONTROL_BLOCK { + ULONG Signature; USHORT RefCount; USHORT Flags; struct @@ -905,6 +917,13 @@ EnlistKeyBodyWithKCB( IN PCM_KEY_BODY KeyObject, IN ULONG Flags +); + +VOID +NTAPI +DelistKeyBodyFromKCB( + IN PCM_KEY_BODY KeyBody, + IN BOOLEAN LockHeld ); NTSTATUS Modified: trunk/reactos/ntoskrnl/include/internal/cm_x.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/cm_x.h (original) +++ trunk/reactos/ntoskrnl/include/internal/cm_x.h Sun Dec 16 19:37:15 2007 @@ -63,6 +63,8 @@ GET_HASH_KEY(ConvKey) % CmpHashTableSize #define GET_HASH_ENTRY(Table, ConvKey) \ (Table[GET_HASH_INDEX(ConvKey)]) +#define ASSERT_VALID_HASH(h) \ + ASSERT_KCB_VALID(CONTAINING_RECORD((h), CM_KEY_CONTROL_BLOCK, KeyHash)) // // Returns whether or not the cell is cached @@ -95,6 +97,12 @@ #define CMP_ASSERT_EXCLUSIVE_REGISTRY_LOCK() \ ASSERT((CmpSpecialBootCondition == TRUE) || \ (CmpTestRegistryLockExclusive() == TRUE)) + +// +// Makes sure this is a valid KCB +// +#define ASSERT_KCB_VALID(k) \ + ASSERT((k)->Signature == CM_KCB_SIGNATURE) // // Checks if a KCB is exclusively locked
17 years
1
0
0
0
[fireball] 31281: - Sync binhive.c changes with trunk. - Remove duplicated CM structs definitions. - Fixed up code so it compiles.
by fireball@svn.reactos.org
Author: fireball Date: Sun Dec 16 19:02:56 2007 New Revision: 31281 URL:
http://svn.reactos.org/svn/reactos?rev=31281&view=rev
Log: - Sync binhive.c changes with trunk. - Remove duplicated CM structs definitions. - Fixed up code so it compiles. Modified: branches/winldr/arch/i386/hardware.c branches/winldr/reactos/binhive.c branches/winldr/reactos/reactos.c branches/winldr/reactos/setupldr.c Modified: branches/winldr/arch/i386/hardware.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/arch/i386/hardware.c?rev…
============================================================================== --- branches/winldr/arch/i386/hardware.c (original) +++ branches/winldr/arch/i386/hardware.c Sun Dec 16 19:02:56 2007 @@ -79,44 +79,6 @@ /* Timeout in ms for sending to keyboard controller. */ #define CONTROLLER_TIMEOUT 250 - - -typedef struct _CM_DISK_GEOMETRY_DEVICE_DATA -{ - ULONG BytesPerSector; - ULONG NumberOfCylinders; - ULONG SectorsPerTrack; - ULONG NumberOfHeads; -} CM_DISK_GEOMETRY_DEVICE_DATA, *PCM_DISK_GEOMETRY_DEVICE_DATA; - - -typedef struct _CM_PNP_BIOS_DEVICE_NODE -{ - USHORT Size; - CHAR Node; - ULONG ProductId; - CHAR DeviceType[3]; - USHORT DeviceAttributes; -} __attribute__((packed)) CM_PNP_BIOS_DEVICE_NODE, *PCM_PNP_BIOS_DEVICE_NODE; - - -typedef struct _CM_PNP_BIOS_INSTALLATION_CHECK -{ - UCHAR Signature[4]; - UCHAR Revision; - UCHAR Length; - USHORT ControlField; - UCHAR Checksum; - ULONG EventFlagAddress; - USHORT RealModeEntryOffset; - USHORT RealModeEntrySegment; - USHORT ProtectedModeEntryOffset; - ULONG ProtectedModeCodeBaseAddress; - ULONG OemDeviceId; - USHORT RealModeDataBaseAddress; - ULONG ProtectedModeDataBaseAddress; -} __attribute__((packed)) CM_PNP_BIOS_INSTALLATION_CHECK, *PCM_PNP_BIOS_INSTALLATION_CHECK; - static CHAR Hex[] = "0123456789abcdef"; static unsigned int delay_count = 1; Modified: branches/winldr/reactos/binhive.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/reactos/binhive.c?rev=31…
============================================================================== --- branches/winldr/reactos/binhive.c (original) +++ branches/winldr/reactos/binhive.c Sun Dec 16 19:02:56 2007 @@ -23,11 +23,14 @@ #include <cmlib.h> #include <debug.h> +#define REG_DATA_SIZE_MASK 0x7FFFFFFF +#define REG_DATA_IN_OFFSET 0x80000000 + /* FUNCTIONS ****************************************************************/ static PVOID NTAPI -CmpAllocate (SIZE_T Size, BOOLEAN Paged) +CmpAllocate (SIZE_T Size, BOOLEAN Paged, ULONG Tag) { return MmHeapAlloc(Size); } @@ -35,489 +38,10 @@ static VOID NTAPI -CmpFree (PVOID Ptr) +CmpFree (PVOID Ptr, IN ULONG Quota) { return MmHeapFree(Ptr); } - - -static BOOLEAN -CmiAllocateHashTableCell (PHHIVE Hive, - PHCELL_INDEX HBOffset, - ULONG SubKeyCount) -{ - PHASH_TABLE_CELL HashCell; - ULONG NewHashSize; - - NewHashSize = sizeof(HASH_TABLE_CELL) + - (SubKeyCount * sizeof(HASH_RECORD)); - *HBOffset = HvAllocateCell (Hive, NewHashSize, HvStable); - if (*HBOffset == HCELL_NULL) - { - return FALSE; - } - - HashCell = HvGetCell (Hive, *HBOffset); - HashCell->Id = REG_HASH_TABLE_CELL_ID; - HashCell->HashTableSize = SubKeyCount; - - return TRUE; -} - - -static BOOLEAN -CmiAddKeyToParentHashTable (PHHIVE Hive, - HCELL_INDEX Parent, - PCM_KEY_NODE NewKeyCell, - HCELL_INDEX NKBOffset) -{ - PHASH_TABLE_CELL HashBlock; - PCM_KEY_NODE ParentKeyCell; - ULONG i; - - ParentKeyCell = HvGetCell (Hive, Parent); - HashBlock = HvGetCell (Hive, ParentKeyCell->SubKeyLists[HvStable]); - - for (i = 0; i < HashBlock->HashTableSize; i++) - { - if (HashBlock->Table[i].KeyOffset == 0) - { - HashBlock->Table[i].KeyOffset = NKBOffset; - memcpy (&HashBlock->Table[i].HashValue, - NewKeyCell->Name, - min(NewKeyCell->NameSize, sizeof(ULONG))); - ParentKeyCell->SubKeyCounts[HvStable]++; - return TRUE; - } - } - - return FALSE; -} - - -static BOOLEAN -CmiAllocateValueListCell (PHHIVE Hive, - PHCELL_INDEX ValueListOffset, - ULONG ValueCount) -{ - ULONG ValueListSize; - - ValueListSize = sizeof(VALUE_LIST_CELL) + - (ValueCount * sizeof(HCELL_INDEX)); - *ValueListOffset = HvAllocateCell (Hive, ValueListSize, HvStable); - if (*ValueListOffset == HCELL_NULL) - { - DbgPrint((DPRINT_REGISTRY, "HvAllocateCell() failed\n")); - return FALSE; - } - - return TRUE; -} - - -static BOOLEAN -CmiAllocateValueCell(PHHIVE Hive, - PCM_KEY_VALUE *ValueCell, - HCELL_INDEX *ValueCellOffset, - PWCHAR ValueName) -{ - PCM_KEY_VALUE NewValueCell; - ULONG NameSize; - BOOLEAN Packable = TRUE; - ULONG i; - - NameSize = (ValueName == NULL) ? 0 : wcslen (ValueName); - for (i = 0; i < NameSize; i++) - { - if (ValueName[i] & 0xFF00) - { - NameSize *= sizeof(WCHAR); - Packable = FALSE; - break; - } - } - *ValueCellOffset = HvAllocateCell (Hive, sizeof(CM_KEY_VALUE) + NameSize, HvStable); - if (*ValueCellOffset == HCELL_NULL) - { - DbgPrint((DPRINT_REGISTRY, "CmiAllocateCell() failed\n")); - return FALSE; - } - - NewValueCell = (PCM_KEY_VALUE) HvGetCell (Hive, *ValueCellOffset); - NewValueCell->Id = REG_VALUE_CELL_ID; - NewValueCell->NameSize = NameSize; - NewValueCell->Flags = 0; - if (NameSize > 0) - { - if (Packable) - { - for (i = 0; i < NameSize; i++) - { - ((PCHAR)NewValueCell->Name)[i] = (CHAR)ValueName[i]; - } - NewValueCell->Flags |= REG_VALUE_NAME_PACKED; - } - else - { - memcpy (NewValueCell->Name, - ValueName, - NameSize); - } - } - NewValueCell->DataType = 0; - NewValueCell->DataSize = 0; - NewValueCell->DataOffset = -1; - - *ValueCell = NewValueCell; - - return TRUE; -} - - -static BOOLEAN -CmiAddValueToKeyValueList(PHHIVE Hive, - HCELL_INDEX KeyCellOffset, - HCELL_INDEX ValueCellOffset) -{ - PVALUE_LIST_CELL ValueListCell; - PCM_KEY_NODE KeyCell; - - KeyCell = HvGetCell (Hive, KeyCellOffset); - if (KeyCell == NULL) - { - DbgPrint((DPRINT_REGISTRY, "HvGetCell() failed\n")); - return FALSE; - } - - ValueListCell = HvGetCell (Hive, KeyCell->ValueList.List); - if (ValueListCell == NULL) - { - DbgPrint((DPRINT_REGISTRY, "HvGetCell() failed\n")); - return FALSE; - } - - ValueListCell->ValueOffset[KeyCell->ValueList.Count] = ValueCellOffset; - KeyCell->ValueList.Count++; - - return TRUE; -} - -static BOOLEAN -CmiExportValue (PHHIVE Hive, - HCELL_INDEX KeyCellOffset, - FRLDRHKEY Key, - PVALUE Value) -{ - HCELL_INDEX ValueCellOffset; - HCELL_INDEX DataCellOffset; - PCM_KEY_VALUE ValueCell; - PVOID DataCell; - ULONG DataSize; - ULONG DataType; - PCHAR Data; - - DbgPrint((DPRINT_REGISTRY, "CmiExportValue('%S') called\n", - (Value == NULL) ? "<default>" : (PCHAR)Value->Name)); - DbgPrint((DPRINT_REGISTRY, "DataSize %lu\n", - (Value == NULL) ? Key->DataSize : Value->DataSize)); - - /* Allocate value cell */ - if (!CmiAllocateValueCell(Hive, &ValueCell, &ValueCellOffset, (Value == NULL) ? NULL : Value->Name)) - { - return FALSE; - } - - if (!CmiAddValueToKeyValueList(Hive, KeyCellOffset, ValueCellOffset)) - { - return FALSE; - } - - if (Value == NULL) - { - DataType = Key->DataType; - DataSize = Key->DataSize; - Data = Key->Data; - } - else - { - DataType = Value->DataType; - DataSize = Value->DataSize; - Data = Value->Data; - } - - if (DataSize <= sizeof(HCELL_INDEX)) - { - ValueCell->DataSize = DataSize | REG_DATA_IN_OFFSET; - ValueCell->DataType = DataType; - memcpy (&ValueCell->DataOffset, - &Data, - DataSize); - } - else - { - /* Allocate data cell */ - DataCellOffset = HvAllocateCell (Hive, DataSize, HvStable); - if (DataCellOffset == HCELL_NULL) - { - return FALSE; - } - - ValueCell->DataOffset = DataCellOffset; - ValueCell->DataSize = DataSize; - ValueCell->DataType = DataType; - - DataCell = HvGetCell (Hive, DataCellOffset); - memcpy (DataCell, - Data, - DataSize); - } - - return TRUE; -} - - -static BOOLEAN -CmiExportSubKey (PHHIVE Hive, - HCELL_INDEX Parent, - FRLDRHKEY ParentKey, - FRLDRHKEY Key) -{ - HCELL_INDEX NKBOffset; - PCM_KEY_NODE NewKeyCell; - ULONG KeyCellSize; - ULONG SubKeyCount; - ULONG ValueCount; - PLIST_ENTRY Entry; - FRLDRHKEY SubKey; - PVALUE Value; - BOOLEAN Packable = TRUE; - ULONG i; - ULONG NameSize; - - DbgPrint((DPRINT_REGISTRY, "CmiExportSubKey('%S') called\n", Key->Name)); - - /* Don't export links */ - if (Key->DataType == REG_LINK) - return TRUE; - - NameSize = (Key->NameSize - sizeof(WCHAR)) / sizeof(WCHAR); - for (i = 0; i < NameSize; i++) - { - if (Key->Name[i] & 0xFF00) - { - Packable = FALSE; - NameSize *= sizeof(WCHAR); - break; - } - } - - /* Allocate key cell */ - KeyCellSize = sizeof(CM_KEY_NODE) + NameSize; - NKBOffset = HvAllocateCell (Hive, KeyCellSize, HvStable); - if (NKBOffset == HCELL_NULL) - { - DbgPrint((DPRINT_REGISTRY, "HvAllocateCell() failed\n")); - return FALSE; - } - - /* Initialize key cell */ - NewKeyCell = (PCM_KEY_NODE) HvGetCell (Hive, NKBOffset); - NewKeyCell->Id = REG_KEY_CELL_ID; - NewKeyCell->Flags = 0; - NewKeyCell->LastWriteTime.QuadPart = 0ULL; - NewKeyCell->Parent = Parent; - NewKeyCell->SubKeyCounts[HvStable] = 0; - NewKeyCell->SubKeyLists[HvStable] = -1; - NewKeyCell->ValueList.Count = 0; - NewKeyCell->ValueList.List = -1; - NewKeyCell->SecurityKeyOffset = -1; - NewKeyCell->ClassNameOffset = -1; - NewKeyCell->NameSize = NameSize; - NewKeyCell->ClassSize = 0; - if (Packable) - { - for (i = 0; i < NameSize; i++) - { - ((PCHAR)NewKeyCell->Name)[i] = (CHAR)Key->Name[i]; - } - NewKeyCell->Flags |= REG_KEY_NAME_PACKED; - - } - else - { - memcpy (NewKeyCell->Name, - Key->Name, - NameSize); - } - - /* Add key cell to the parent key's hash table */ - if (!CmiAddKeyToParentHashTable (Hive, - Parent, - NewKeyCell, - NKBOffset)) - { - DbgPrint((DPRINT_REGISTRY, "CmiAddKeyToParentHashTable() failed\n")); - return FALSE; - } - - ValueCount = RegGetValueCount (Key); - DbgPrint((DPRINT_REGISTRY, "ValueCount: %u\n", ValueCount)); - if (ValueCount > 0) - { - /* Allocate value list cell */ - if (!CmiAllocateValueListCell (Hive, - &NewKeyCell->ValueList.List, - ValueCount)) - { - DbgPrint((DPRINT_REGISTRY, "CmiAllocateValueListCell() failed\n")); - return FALSE; - } - - if (Key->DataSize != 0) - { - if (!CmiExportValue (Hive, NKBOffset, Key, NULL)) - return FALSE; - } - - /* Enumerate values */ - Entry = Key->ValueList.Flink; - while (Entry != &Key->ValueList) - { - Value = CONTAINING_RECORD(Entry, - VALUE, - ValueList); - - if (!CmiExportValue (Hive, NKBOffset, Key, Value)) - return FALSE; - - Entry = Entry->Flink; - } - } - - SubKeyCount = RegGetSubKeyCount (Key); - DbgPrint((DPRINT_REGISTRY, "SubKeyCount: %u\n", SubKeyCount)); - if (SubKeyCount > 0) - { - /* Allocate hash table cell */ - if (!CmiAllocateHashTableCell (Hive, - &NewKeyCell->SubKeyLists[HvStable], - SubKeyCount)) - { - DbgPrint((DPRINT_REGISTRY, "CmiAllocateHashTableCell() failed\n")); - return FALSE; - } - - /* Enumerate subkeys */ - Entry = Key->SubKeyList.Flink; - while (Entry != &Key->SubKeyList) - { - SubKey = CONTAINING_RECORD(Entry, - KEY, - KeyList); - - if (!CmiExportSubKey (Hive, NKBOffset, Key, SubKey)) - return FALSE; - - Entry = Entry->Flink; - } - } - - return TRUE; -} - - -static BOOLEAN -CmiExportHive (PHHIVE Hive, - PCWSTR KeyName) -{ - PCM_KEY_NODE KeyCell; - FRLDRHKEY Key; - ULONG SubKeyCount; - ULONG ValueCount; - PLIST_ENTRY Entry; - FRLDRHKEY SubKey; - PVALUE Value; - - DbgPrint((DPRINT_REGISTRY, "CmiExportHive(%x, '%S') called\n", Hive, KeyName)); - - if (RegOpenKey (NULL, KeyName, &Key) != ERROR_SUCCESS) - { - DbgPrint((DPRINT_REGISTRY, "RegOpenKey() failed\n")); - return FALSE; - } - - KeyCell = HvGetCell (Hive, Hive->HiveHeader->RootCell); - if (KeyCell == NULL) - { - DbgPrint((DPRINT_REGISTRY, "HvGetCell() failed\n")); - return FALSE; - } - - ValueCount = RegGetValueCount (Key); - DbgPrint((DPRINT_REGISTRY, "ValueCount: %u\n", ValueCount)); - if (ValueCount > 0) - { - /* Allocate value list cell */ - if (!CmiAllocateValueListCell (Hive, - &KeyCell->ValueList.List, - ValueCount)) - { - DbgPrint((DPRINT_REGISTRY, "CmiAllocateValueListCell() failed\n")); - return FALSE; - } - - if (Key->DataSize != 0) - { - if (!CmiExportValue (Hive, Hive->HiveHeader->RootCell, Key, NULL)) - return FALSE; - } - - /* Enumerate values */ - Entry = Key->ValueList.Flink; - while (Entry != &Key->ValueList) - { - Value = CONTAINING_RECORD(Entry, - VALUE, - ValueList); - - if (!CmiExportValue (Hive, Hive->HiveHeader->RootCell, Key, Value)) - return FALSE; - - Entry = Entry->Flink; - } - } - - SubKeyCount = RegGetSubKeyCount (Key); - DbgPrint((DPRINT_REGISTRY, "SubKeyCount: %u\n", SubKeyCount)); - if (SubKeyCount > 0) - { - /* Allocate hash table cell */ - if (!CmiAllocateHashTableCell (Hive, - &KeyCell->SubKeyLists[HvStable], - SubKeyCount)) - { - DbgPrint((DPRINT_REGISTRY, "CmiAllocateHashTableCell() failed\n")); - return FALSE; - } - - /* Enumerate subkeys */ - Entry = Key->SubKeyList.Flink; - while (Entry != &Key->SubKeyList) - { - SubKey = CONTAINING_RECORD(Entry, - KEY, - KeyList); - - if (!CmiExportSubKey (Hive, Hive->HiveHeader->RootCell, Key, SubKey)) - return FALSE; - - Entry = Entry->Flink; - } - } - - return TRUE; -} - static BOOLEAN RegImportValue (PHHIVE Hive, @@ -527,45 +51,45 @@ PVOID DataCell; PWCHAR wName; LONG Error; - ULONG DataSize; + ULONG DataLength; ULONG i; - if (ValueCell->Id != REG_VALUE_CELL_ID) + if (ValueCell->Signature != CM_KEY_VALUE_SIGNATURE) { DbgPrint((DPRINT_REGISTRY, "Invalid key cell!\n")); return FALSE; } - if (ValueCell->Flags & REG_VALUE_NAME_PACKED) - { - wName = MmHeapAlloc((ValueCell->NameSize + 1)*sizeof(WCHAR)); - for (i = 0; i < ValueCell->NameSize; i++) + if (ValueCell->Flags & VALUE_COMP_NAME) + { + wName = MmHeapAlloc((ValueCell->NameLength + 1)*sizeof(WCHAR)); + for (i = 0; i < ValueCell->NameLength; i++) { wName[i] = ((PCHAR)ValueCell->Name)[i]; } - wName[ValueCell->NameSize] = 0; + wName[ValueCell->NameLength] = 0; } else { - wName = MmHeapAlloc(ValueCell->NameSize + sizeof(WCHAR)); + wName = MmHeapAlloc(ValueCell->NameLength + sizeof(WCHAR)); memcpy (wName, ValueCell->Name, - ValueCell->NameSize); - wName[ValueCell->NameSize / sizeof(WCHAR)] = 0; - } - - DataSize = ValueCell->DataSize & REG_DATA_SIZE_MASK; + ValueCell->NameLength); + wName[ValueCell->NameLength / sizeof(WCHAR)] = 0; + } + + DataLength = ValueCell->DataLength & REG_DATA_SIZE_MASK; DbgPrint((DPRINT_REGISTRY, "ValueName: '%S'\n", wName)); - DbgPrint((DPRINT_REGISTRY, "DataSize: %u\n", DataSize)); - - if (DataSize <= sizeof(HCELL_INDEX) && (ValueCell->DataSize & REG_DATA_IN_OFFSET)) + DbgPrint((DPRINT_REGISTRY, "DataLength: %u\n", DataLength)); + + if (DataLength <= sizeof(HCELL_INDEX) && (ValueCell->DataLength & REG_DATA_IN_OFFSET)) { Error = RegSetValue(Key, wName, - ValueCell->DataType, - (PCHAR)&ValueCell->DataOffset, - DataSize); + ValueCell->Type, + (PCHAR)&ValueCell->Data, + DataLength); if (Error != ERROR_SUCCESS) { DbgPrint((DPRINT_REGISTRY, "RegSetValue() failed!\n")); @@ -575,15 +99,15 @@ } else { - DataCell = HvGetCell (Hive, ValueCell->DataOffset); + DataCell = (PVOID)HvGetCell (Hive, ValueCell->Data); DbgPrint((DPRINT_REGISTRY, "DataCell: %x\n", DataCell)); Error = RegSetValue (Key, wName, - ValueCell->DataType, + ValueCell->Type, DataCell, - DataSize); - + DataLength); + if (Error != ERROR_SUCCESS) { DbgPrint((DPRINT_REGISTRY, "RegSetValue() failed!\n")); @@ -603,7 +127,7 @@ PCM_KEY_NODE KeyCell, FRLDRHKEY ParentKey) { - PHASH_TABLE_CELL HashCell; + PCM_KEY_FAST_INDEX HashCell; PCM_KEY_NODE SubKeyCell; PVALUE_LIST_CELL ValueListCell; PCM_KEY_VALUE ValueCell = NULL; @@ -614,29 +138,29 @@ DbgPrint((DPRINT_REGISTRY, "KeyCell: %x\n", KeyCell)); - DbgPrint((DPRINT_REGISTRY, "KeyCell->Id: %x\n", KeyCell->Id)); - if (KeyCell->Id != REG_KEY_CELL_ID) - { - DbgPrint((DPRINT_REGISTRY, "Invalid key cell id!\n")); - return FALSE; - } - - if (KeyCell->Flags & REG_KEY_NAME_PACKED) - { - wName = MmHeapAlloc ((KeyCell->NameSize + 1) * sizeof(WCHAR)); - for (i = 0; i < KeyCell->NameSize; i++) + DbgPrint((DPRINT_REGISTRY, "KeyCell->Signature: %x\n", KeyCell->Signature)); + if (KeyCell->Signature != CM_KEY_NODE_SIGNATURE) + { + DbgPrint((DPRINT_REGISTRY, "Invalid key cell Signature!\n")); + return FALSE; + } + + if (KeyCell->Flags & KEY_COMP_NAME) + { + wName = MmHeapAlloc ((KeyCell->NameLength + 1) * sizeof(WCHAR)); + for (i = 0; i < KeyCell->NameLength; i++) { wName[i] = ((PCHAR)KeyCell->Name)[i]; } - wName[KeyCell->NameSize] = 0; + wName[KeyCell->NameLength] = 0; } else { - wName = MmHeapAlloc (KeyCell->NameSize + sizeof(WCHAR)); + wName = MmHeapAlloc (KeyCell->NameLength + sizeof(WCHAR)); memcpy (wName, KeyCell->Name, - KeyCell->NameSize); - wName[KeyCell->NameSize/sizeof(WCHAR)] = 0; + KeyCell->NameLength); + wName[KeyCell->NameLength/sizeof(WCHAR)] = 0; } DbgPrint((DPRINT_REGISTRY, "KeyName: '%S'\n", wName)); @@ -674,18 +198,17 @@ } /* Enumerate and add subkeys */ - if (KeyCell->SubKeyCounts[HvStable] > 0) - { - HashCell = (PHASH_TABLE_CELL) HvGetCell (Hive, KeyCell->SubKeyLists[HvStable]); + if (KeyCell->SubKeyCounts[Stable] > 0) + { + HashCell = (PCM_KEY_FAST_INDEX) HvGetCell (Hive, KeyCell->SubKeyLists[Stable]); DbgPrint((DPRINT_REGISTRY, "HashCell: %x\n", HashCell)); - DbgPrint((DPRINT_REGISTRY, "HashCell->Id: %x\n", HashCell->Id)); DbgPrint((DPRINT_REGISTRY, "SubKeyCounts: %x\n", KeyCell->SubKeyCounts)); - for (i = 0; i < KeyCell->SubKeyCounts[HvStable]; i++) - { - DbgPrint((DPRINT_REGISTRY, "KeyOffset[%d]: %x\n", i, HashCell->Table[i].KeyOffset)); - - SubKeyCell = (PCM_KEY_NODE) HvGetCell (Hive, HashCell->Table[i].KeyOffset); + for (i = 0; i < KeyCell->SubKeyCounts[Stable]; i++) + { + DbgPrint((DPRINT_REGISTRY, "Cell[%d]: %x\n", i, HashCell->List[i].Cell)); + + SubKeyCell = (PCM_KEY_NODE) HvGetCell (Hive, HashCell->List[i].Cell); DbgPrint((DPRINT_REGISTRY, "SubKeyCell[%d]: %x\n", i, SubKeyCell)); @@ -703,35 +226,44 @@ ULONG ChunkSize) { PCM_KEY_NODE KeyCell; - PHASH_TABLE_CELL HashCell; + PCM_KEY_FAST_INDEX HashCell; PCM_KEY_NODE SubKeyCell; FRLDRHKEY SystemKey; ULONG i; LONG Error; - PEREGISTRY_HIVE CmHive; + PCMHIVE CmHive; PHHIVE Hive; NTSTATUS Status; DbgPrint((DPRINT_REGISTRY, "RegImportBinaryHive(%x, %u) called\n",ChunkBase,ChunkSize)); - CmHive = CmpAllocate(sizeof(EREGISTRY_HIVE), TRUE); - Status = HvInitialize (&CmHive->Hive, HV_OPERATION_MEMORY_INPLACE, 0, 0, - (ULONG_PTR)ChunkBase, 0, - CmpAllocate, CmpFree, - NULL, NULL, NULL, NULL, NULL); + CmHive = CmpAllocate(sizeof(CMHIVE), TRUE, 0); + Status = HvInitialize (&CmHive->Hive, + HINIT_FLAT, + 0, + 0, + ChunkBase, + CmpAllocate, + CmpFree, + NULL, + NULL, + NULL, + NULL, + 1, + NULL); if (!NT_SUCCESS(Status)) { - DbgPrint((DPRINT_REGISTRY, "Invalid hive id!\n")); + DbgPrint((DPRINT_REGISTRY, "Invalid hive Signature!\n")); return FALSE; } Hive = &CmHive->Hive; - KeyCell = HvGetCell (Hive, Hive->HiveHeader->RootCell); + KeyCell = (PCM_KEY_NODE)HvGetCell (Hive, Hive->BaseBlock->RootCell); DbgPrint((DPRINT_REGISTRY, "KeyCell: %x\n", KeyCell)); - DbgPrint((DPRINT_REGISTRY, "KeyCell->Id: %x\n", KeyCell->Id)); - if (KeyCell->Id != REG_KEY_CELL_ID) - { - DbgPrint((DPRINT_REGISTRY, "Invalid key cell id!\n")); + DbgPrint((DPRINT_REGISTRY, "KeyCell->Signature: %x\n", KeyCell->Signature)); + if (KeyCell->Signature != CM_KEY_NODE_SIGNATURE) + { + DbgPrint((DPRINT_REGISTRY, "Invalid key cell Signature!\n")); return FALSE; } @@ -749,17 +281,17 @@ } /* Enumerate and add subkeys */ - if (KeyCell->SubKeyCounts[HvStable] > 0) - { - HashCell = HvGetCell (Hive, KeyCell->SubKeyLists[HvStable]); + if (KeyCell->SubKeyCounts[Stable] > 0) + { + HashCell = (PCM_KEY_FAST_INDEX)HvGetCell (Hive, KeyCell->SubKeyLists[Stable]); DbgPrint((DPRINT_REGISTRY, "HashCell: %x\n", HashCell)); - DbgPrint((DPRINT_REGISTRY, "SubKeyCounts: %x\n", KeyCell->SubKeyCounts[HvStable])); - - for (i = 0; i < KeyCell->SubKeyCounts[HvStable]; i++) - { - DbgPrint((DPRINT_REGISTRY, "KeyOffset[%d]: %x\n", i, HashCell->Table[i].KeyOffset)); - - SubKeyCell = HvGetCell (Hive, HashCell->Table[i].KeyOffset); + DbgPrint((DPRINT_REGISTRY, "SubKeyCounts: %x\n", KeyCell->SubKeyCounts[Stable])); + + for (i = 0; i < KeyCell->SubKeyCounts[Stable]; i++) + { + DbgPrint((DPRINT_REGISTRY, "Cell[%d]: %x\n", i, HashCell->List[i].Cell)); + + SubKeyCell = (PCM_KEY_NODE)HvGetCell (Hive, HashCell->List[i].Cell); DbgPrint((DPRINT_REGISTRY, "SubKeyCell[%d]: %x\n", i, SubKeyCell)); @@ -771,76 +303,4 @@ return TRUE; } - -static VOID -CmiWriteHive(PHHIVE Hive, - PCHAR ChunkBase, - ULONG* ChunkSize) -{ - PHBIN Bin; - ULONG i, Size; - - /* Write hive header */ - memcpy (ChunkBase, Hive->HiveHeader, HV_BLOCK_SIZE); - Size = HV_BLOCK_SIZE; - - Bin = NULL; - for (i = 0; i < Hive->Storage[HvStable].Length; i++) - { - if (Hive->Storage[HvStable].BlockList[i].Bin != (ULONG_PTR)Bin) - { - Bin = (PHBIN)Hive->Storage[HvStable].BlockList[i].Bin; - memcpy (ChunkBase + (i + 1) * HV_BLOCK_SIZE, - Bin, Bin->Size); - Size += Bin->Size; - } - } - - DbgPrint((DPRINT_REGISTRY, "ChunkSize: %x\n", Size)); - - *ChunkSize = Size; -} - - -BOOLEAN -RegExportBinaryHive(PCWSTR KeyName, - PCHAR ChunkBase, - ULONG* ChunkSize) -{ - PEREGISTRY_HIVE CmHive; - PHHIVE Hive; - NTSTATUS Status; - - DbgPrint((DPRINT_REGISTRY, "Creating binary hardware hive\n")); - - CmHive = CmpAllocate(sizeof(EREGISTRY_HIVE), TRUE); - Status = HvInitialize (&CmHive->Hive, HV_OPERATION_CREATE_HIVE, 0, 0, 0, 0, - CmpAllocate, CmpFree, - NULL, NULL, NULL, NULL, NULL); - Hive = &CmHive->Hive; - if (!NT_SUCCESS(Status)) - { - return FALSE; - } - - /* Init root key cell */ - if (!CmCreateRootNode (Hive, KeyName)) - { - HvFree (Hive); - return FALSE; - } - - if (!CmiExportHive (Hive, KeyName)) - { - HvFree (Hive); - return FALSE; - } - - CmiWriteHive (Hive, ChunkBase, ChunkSize); - - HvFree (Hive); - - return TRUE; -} - /* EOF */ Modified: branches/winldr/reactos/reactos.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/reactos/reactos.c?rev=31…
============================================================================== --- branches/winldr/reactos/reactos.c (original) +++ branches/winldr/reactos/reactos.c Sun Dec 16 19:02:56 2007 @@ -900,7 +900,7 @@ * Export the hardware hive */ Base = FrLdrCreateModule ("HARDWARE"); - RegExportBinaryHive (L"\\Registry\\Machine\\HARDWARE", (PCHAR)Base, &Size); + //RegExportBinaryHive (L"\\Registry\\Machine\\HARDWARE", (PCHAR)Base, &Size); FrLdrCloseModule (Base, Size); UiDrawProgressBarCenter(20, 100, szLoadingMsg); Modified: branches/winldr/reactos/setupldr.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/reactos/setupldr.c?rev=3…
============================================================================== --- branches/winldr/reactos/setupldr.c (original) +++ branches/winldr/reactos/setupldr.c Sun Dec 16 19:02:56 2007 @@ -279,8 +279,8 @@ VOID RunLoader(VOID) { - ULONG_PTR Base; - ULONG Size; + //ULONG_PTR Base; + //ULONG Size; const char *SourcePath; const char *LoadOptions = "", *DbgLoadOptions = ""; UINT i; @@ -447,9 +447,9 @@ LoadKernelSymbols(SourcePath, "ntoskrnl.exe"); /* Export the hardware hive */ - Base = FrLdrCreateModule ("HARDWARE"); - RegExportBinaryHive (L"\\Registry\\Machine\\HARDWARE", (PVOID)Base, &Size); - FrLdrCloseModule (Base, Size); + //Base = FrLdrCreateModule ("HARDWARE"); + //RegExportBinaryHive (L"\\Registry\\Machine\\HARDWARE", (PVOID)Base, &Size); + //FrLdrCloseModule (Base, Size); #if 0 printf("Base: %x\n", Base);
17 years
1
0
0
0
← Newer
1
...
22
23
24
25
26
27
28
...
61
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Results per page:
10
25
50
100
200