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
September 2011
----- 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
20 participants
399 discussions
Start a n
N
ew thread
[cgutman] 53690: [FREELOADER] - Use a larger data type to iterate through the disk buffer to avoid an infinite loop with broken BIOSes
by cgutman@svn.reactos.org
Author: cgutman Date: Sun Sep 11 15:32:15 2011 New Revision: 53690 URL:
http://svn.reactos.org/svn/reactos?rev=53690&view=rev
Log: [FREELOADER] - Use a larger data type to iterate through the disk buffer to avoid an infinite loop with broken BIOSes Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/hardware.c [iso-8859-1] Sun Sep 11 15:32:15 2011 @@ -801,7 +801,8 @@ PCM_PARTIAL_RESOURCE_LIST PartialResourceList; PCM_INT13_DRIVE_PARAMETER Int13Drives; GEOMETRY Geometry; - UCHAR DiskCount, i; + UCHAR DiskCount; + USHORT i; ULONG Size; BOOLEAN Changed; Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/xboxhw.c [iso-8859-1] Sun Sep 11 15:32:15 2011 @@ -324,7 +324,8 @@ PCM_INT13_DRIVE_PARAMETER Int13Drives; GEOMETRY Geometry; PCONFIGURATION_COMPONENT_DATA DiskKey, ControllerKey; - UCHAR DiskCount, i; + UCHAR DiskCount; + USHORT i; ULONG Size; BOOLEAN Changed;
13 years, 3 months
1
0
0
0
[cgutman] 53689: [WS2_32_NEW] - Fix an error found by PVS Studio [RAMDISK] - Fix an error found by PVS Studio
by cgutman@svn.reactos.org
Author: cgutman Date: Sun Sep 11 15:17:48 2011 New Revision: 53689 URL:
http://svn.reactos.org/svn/reactos?rev=53689&view=rev
Log: [WS2_32_NEW] - Fix an error found by PVS Studio [RAMDISK] - Fix an error found by PVS Studio Modified: trunk/reactos/dll/win32/ws2_32_new/src/sockctrl.c trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c Modified: trunk/reactos/dll/win32/ws2_32_new/src/sockctrl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/ws2_32_new/src/s…
============================================================================== --- trunk/reactos/dll/win32/ws2_32_new/src/sockctrl.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/ws2_32_new/src/sockctrl.c [iso-8859-1] Sun Sep 11 15:17:48 2011 @@ -53,8 +53,8 @@ /* Check if error code was due to the host not being found */ if ((Status == SOCKET_ERROR) && - (ErrorCode == WSAEHOSTUNREACH) && - (ErrorCode == WSAENETUNREACH)) + ((ErrorCode == WSAEHOSTUNREACH) || + (ErrorCode == WSAENETUNREACH))) { /* Check if we can try again */ if (TryAgain) Modified: trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/class/ramd…
============================================================================== --- trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c [iso-8859-1] Sun Sep 11 15:17:48 2011 @@ -1953,7 +1953,7 @@ // // Only remove-device and query-id are allowed // - if ((Minor != IRP_MN_REMOVE_DEVICE) || (Minor != IRP_MN_QUERY_ID)) + if ((Minor != IRP_MN_REMOVE_DEVICE) && (Minor != IRP_MN_QUERY_ID)) { // // Fail anything else
13 years, 3 months
1
0
0
0
[tfaber] 53688: [NTOSKRNL][RTL][DOC] - Fix incorrect loop boundaries in the ARM version of MmCreateProcessAddressSpace. Spotted by Vincenzo Cotugno and cppcheck - Correct outdated wineimport.cmd UR...
by tfaber@svn.reactos.org
Author: tfaber Date: Sun Sep 11 11:47:28 2011 New Revision: 53688 URL:
http://svn.reactos.org/svn/reactos?rev=53688&view=rev
Log: [NTOSKRNL][RTL][DOC] - Fix incorrect loop boundaries in the ARM version of MmCreateProcessAddressSpace. Spotted by Vincenzo Cotugno and cppcheck - Correct outdated wineimport.cmd URL in README.WINE - Assorted spelling and readability fixes Modified: trunk/reactos/lib/rtl/i386/rtlmem.s trunk/reactos/lib/rtl/path.c trunk/reactos/media/doc/README.WINE trunk/reactos/ntoskrnl/ex/i386/fastinterlck_asm.S trunk/reactos/ntoskrnl/ke/spinlock.c trunk/reactos/ntoskrnl/mm/ARM3/mdlsup.c trunk/reactos/ntoskrnl/mm/arm/stubs.c trunk/reactos/ntoskrnl/ob/oblife.c Modified: trunk/reactos/lib/rtl/i386/rtlmem.s URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/i386/rtlmem.s?rev=…
============================================================================== --- trunk/reactos/lib/rtl/i386/rtlmem.s [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/i386/rtlmem.s [iso-8859-1] Sun Sep 11 11:47:28 2011 @@ -65,7 +65,7 @@ NotEqual2: - /* Remember how many mathced */ + /* Remember how many matched */ dec esi sub esi, [esp+12] Modified: trunk/reactos/lib/rtl/path.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/path.c?rev=53688&r…
============================================================================== --- trunk/reactos/lib/rtl/path.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/path.c [iso-8859-1] Sun Sep 11 11:47:28 2011 @@ -489,7 +489,7 @@ else { /* Use the optimized path after acquiring the lock */ - QuickPath = 1; + QuickPath = TRUE; NewBuffer = NULL; } Modified: trunk/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?rev=…
============================================================================== --- trunk/reactos/media/doc/README.WINE [iso-8859-1] (original) +++ trunk/reactos/media/doc/README.WINE [iso-8859-1] Sun Sep 11 11:47:28 2011 @@ -270,7 +270,7 @@ Update process for autosync DLLs *** This process can only be done on Microsoft Windows *** -- Download wineimport.cmd at
svn://svn.reactos.org/reactos/trunk/tools/
+- Download wineimport.cmd at
svn://svn.reactos.org/project-tools/trunk/
- Download cvs command line program and be sure to put it in your path (available at
http://ftp.gnu.org/non-gnu/cvs/binary/stable/x86-woe/
) - Download svn command line program and be sure to put it in your path Modified: trunk/reactos/ntoskrnl/ex/i386/fastinterlck_asm.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/i386/fastinter…
============================================================================== --- trunk/reactos/ntoskrnl/ex/i386/fastinterlck_asm.S [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/i386/fastinterlck_asm.S [iso-8859-1] Sun Sep 11 11:47:28 2011 @@ -37,7 +37,7 @@ lock add [ecx], edx /* Check for carry bit and return */ - jb .l1 + jc .l1 ret .l1: @@ -82,7 +82,7 @@ or eax, eax jz .l7 - /* Copy sequence number and adjust it */ + /* Copy depth and adjust it */ lea ecx, [edx-1] /* Get next pointer and do the exchange */ @@ -167,7 +167,7 @@ or eax, eax jz .l10 - /* Clear sequence and pointer */ + /* Clear depth and pointer */ mov ecx, edx mov cx, bx Modified: trunk/reactos/ntoskrnl/ke/spinlock.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/spinlock.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ke/spinlock.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/spinlock.c [iso-8859-1] Sun Sep 11 11:47:28 2011 @@ -291,7 +291,7 @@ FASTCALL KiReleaseSpinLock(IN PKSPIN_LOCK SpinLock) { - /* Do the lined function */ + /* Do the inlined function */ KxReleaseSpinLock(SpinLock); } Modified: trunk/reactos/ntoskrnl/mm/ARM3/mdlsup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/mdlsup.c?…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/mdlsup.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/mdlsup.c [iso-8859-1] Sun Sep 11 11:47:28 2011 @@ -553,7 +553,7 @@ // Get the new base address // BaseAddress = (PVOID)((ULONG_PTR)BaseAddress - - ((*MdlPages) << PAGE_SHIFT)); + (*MdlPages << PAGE_SHIFT)); } // @@ -614,7 +614,7 @@ // Get page and base information // MdlPages = (PPFN_NUMBER)(Mdl + 1); - Base = (PVOID)Mdl->StartVa; + Base = Mdl->StartVa; // // Get the addresses and how many pages we span (and need to lock) @@ -840,7 +840,7 @@ (PointerPte->u.Hard.Valid == 0)) { // - // What kind of lock where we using? + // What kind of lock were we using? // if (UsePfnLock) { @@ -870,7 +870,7 @@ } // - // Waht lock should we use? + // What lock should we use? // if (UsePfnLock) { @@ -908,7 +908,7 @@ if (Address <= MM_HIGHEST_USER_ADDRESS) { // - // What kind of lock where we using? + // What kind of lock were we using? // if (UsePfnLock) { @@ -1040,7 +1040,7 @@ } while (PointerPte <= LastPte); // - // What kind of lock where we using? + // What kind of lock were we using? // if (UsePfnLock) { @@ -1068,7 +1068,7 @@ ASSERT(!NT_SUCCESS(Status)); // - // What kind of lock where we using? + // What kind of lock were we using? // if (UsePfnLock) { @@ -1189,8 +1189,8 @@ ASSERT(Pfn1->u2.ShareCount == 0); /* Not supported yet */ - ASSERT(((Pfn1->u3.e1.PrototypePte == 0) && - (Pfn1->OriginalPte.u.Soft.Prototype == 0))); + ASSERT((Pfn1->u3.e1.PrototypePte == 0) && + (Pfn1->OriginalPte.u.Soft.Prototype == 0)); /* One less page */ InterlockedExchangeAddSizeT(&MmSystemLockPagesCount, -1); @@ -1225,8 +1225,8 @@ ASSERT(Pfn1->u3.e1.PageLocation == ActiveAndValid); /* Not supported yet */ - ASSERT(((Pfn1->u3.e1.PrototypePte == 0) && - (Pfn1->OriginalPte.u.Soft.Prototype == 0))); + ASSERT((Pfn1->u3.e1.PrototypePte == 0) && + (Pfn1->OriginalPte.u.Soft.Prototype == 0)); /* But there is one less "locked" page though */ InterlockedExchangeAddSizeT(&MmSystemLockPagesCount, -1); @@ -1307,7 +1307,7 @@ /* Save the PFN entry instead for the secondary loop */ *MdlPages = (PFN_NUMBER)MiGetPfnEntry(*MdlPages); - ASSERT((*MdlPages) != 0); + ASSERT(*MdlPages != 0); } while (++MdlPages < LastPage); // @@ -1322,7 +1322,7 @@ do { /* Get the current entry and reference count */ - Pfn1 = (PMMPFN)(*MdlPages); + Pfn1 = (PMMPFN)*MdlPages; OldRefCount = Pfn1->u3.e2.ReferenceCount; ASSERT(OldRefCount != 0); @@ -1400,8 +1400,8 @@ MmAdvanceMdl(IN PMDL Mdl, IN ULONG NumberOfBytes) { - UNIMPLEMENTED; - return STATUS_NOT_IMPLEMENTED; + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; } /* @@ -1414,8 +1414,8 @@ IN PMDL MemoryDescriptorList, IN MEMORY_CACHING_TYPE CacheType) { - UNIMPLEMENTED; - return 0; + UNIMPLEMENTED; + return 0; } /* @@ -1427,7 +1427,7 @@ IN ULONG PoolTag, IN PMDL MemoryDescriptorList) { - UNIMPLEMENTED; + UNIMPLEMENTED; } /* @@ -1438,8 +1438,8 @@ MmPrefetchPages(IN ULONG NumberOfLists, IN PREAD_LIST *ReadLists) { - UNIMPLEMENTED; - return STATUS_NOT_IMPLEMENTED; + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; } /* @@ -1450,8 +1450,8 @@ MmProtectMdlSystemAddress(IN PMDL MemoryDescriptorList, IN ULONG NewProtect) { - UNIMPLEMENTED; - return STATUS_NOT_IMPLEMENTED; + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; } /* @@ -1464,7 +1464,7 @@ IN KPROCESSOR_MODE AccessMode, IN LOCK_OPERATION Operation) { - UNIMPLEMENTED; + UNIMPLEMENTED; } @@ -1478,7 +1478,7 @@ IN KPROCESSOR_MODE AccessMode, IN LOCK_OPERATION Operation) { - UNIMPLEMENTED; + UNIMPLEMENTED; } /* Modified: trunk/reactos/ntoskrnl/mm/arm/stubs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/arm/stubs.c?re…
============================================================================== --- trunk/reactos/ntoskrnl/mm/arm/stubs.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/arm/stubs.c [iso-8859-1] Sun Sep 11 11:47:28 2011 @@ -306,7 +306,7 @@ // Loop two tables (Hyperspace and TTB). Each one is 16KB // // - for (i = 0; i < 8; i++) + for (i = 0; i < sizeof(Pfn) / sizeof(Pfn[0]); i++) { // // Allocate a page Modified: trunk/reactos/ntoskrnl/ob/oblife.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/oblife.c?rev=5…
============================================================================== --- trunk/reactos/ntoskrnl/ob/oblife.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ob/oblife.c [iso-8859-1] Sun Sep 11 11:47:28 2011 @@ -1100,7 +1100,7 @@ ObpTypeObjectType, sizeof(OBJECT_TYPE), KernelMode, - (POBJECT_HEADER*)&Header); + &Header); if (!NT_SUCCESS(Status)) { /* Free the name and fail */
13 years, 3 months
1
0
0
0
[tfaber] 53687: [KMTESTS] - Add support for guarded allocations, that can be used to detect buffer overruns - Add GuardedMemory example test - Add MmSection test with some basic parameter checks fo...
by tfaber@svn.reactos.org
Author: tfaber Date: Sun Sep 11 11:22:00 2011 New Revision: 53687 URL:
http://svn.reactos.org/svn/reactos?rev=53687&view=rev
Log: [KMTESTS] - Add support for guarded allocations, that can be used to detect buffer overruns - Add GuardedMemory example test - Add MmSection test with some basic parameter checks for MmCreateSection - Fix some x64 build problems - Update readme Added: trunk/rostests/kmtests/example/GuardedMemory.c (with props) trunk/rostests/kmtests/ntos_mm/ trunk/rostests/kmtests/ntos_mm/MmSection.c (with props) Modified: trunk/rostests/kmtests/CMakeLists.txt trunk/rostests/kmtests/include/kmt_test.h trunk/rostests/kmtests/kmtest.rbuild trunk/rostests/kmtests/kmtest_drv.rbuild trunk/rostests/kmtests/kmtest_drv/testlist.c trunk/rostests/kmtests/ntos_ex/ExDoubleList.c trunk/rostests/kmtests/ntos_ex/ExSequencedList.c trunk/rostests/kmtests/ntos_ex/ExSingleList.c trunk/rostests/kmtests/ntos_ke/KeIrql.c trunk/rostests/kmtests/readme.txt Modified: trunk/rostests/kmtests/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/CMakeLists.txt?re…
============================================================================== --- trunk/rostests/kmtests/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/kmtests/CMakeLists.txt [iso-8859-1] Sun Sep 11 11:22:00 2011 @@ -8,6 +8,7 @@ add_subdirectory(ntos_io) list(APPEND COMMON_SOURCE + example/GuardedMemory.c rtl/RtlAvlTree.c rtl/RtlMemory.c rtl/RtlSplayTree.c) @@ -42,6 +43,7 @@ ntos_ke/KeIrql.c ntos_ke/KeProcessor.c ntos_ke/KeSpinLock.c + ntos_mm/MmSection.c ntos_ob/ObReference.c ntos_ob/ObType.c ${COMMON_SOURCE} Added: trunk/rostests/kmtests/example/GuardedMemory.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/example/GuardedMe…
============================================================================== --- trunk/rostests/kmtests/example/GuardedMemory.c (added) +++ trunk/rostests/kmtests/example/GuardedMemory.c [iso-8859-1] Sun Sep 11 11:22:00 2011 @@ -1,0 +1,63 @@ +/* + * PROJECT: ReactOS kernel-mode tests + * LICENSE: GPLv2+ - See COPYING in the top level directory + * PURPOSE: Kernel-Mode Test Suite Guarded Memory example test + * PROGRAMMER: Thomas Faber <thfabba(a)gmx.de> + */ + +#include <kmt_test.h> + +#ifdef __GNUC__ +#pragma GCC diagnostic ignored "-Wnonnull" +#endif /* defined __GNUC__ */ + +START_TEST(GuardedMemory) +{ + NTSTATUS Status; + SIZE_T Size = 123; + PCHAR *Buffer; + + /* access some invalid memory to test SEH */ + Status = STATUS_SUCCESS; + _SEH2_TRY + { + RtlFillMemory(NULL, 1, 0); + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + Status = _SEH2_GetExceptionCode(); + } _SEH2_END; + ok_eq_hex(Status, STATUS_ACCESS_VIOLATION); + + /* get guarded mem */ + Buffer = KmtAllocateGuarded(Size); + + if (skip(Buffer != NULL, "Failed to allocate guarded memory\n")) + return; + + /* access to guarded mem should be fine */ + Status = STATUS_SUCCESS; + _SEH2_TRY + { + RtlFillMemory(Buffer, Size, 0); + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + Status = _SEH2_GetExceptionCode(); + } _SEH2_END; + ok_eq_hex(Status, STATUS_SUCCESS); + + /* access one byte behind guarded mem must cause an access violation! */ + Status = STATUS_SUCCESS; + _SEH2_TRY + { + RtlFillMemory(Buffer + Size, 1, 0); + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + Status = _SEH2_GetExceptionCode(); + } _SEH2_END; + ok_eq_hex(Status, STATUS_ACCESS_VIOLATION); + + KmtFreeGuarded(Buffer); +} Propchange: trunk/rostests/kmtests/example/GuardedMemory.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/rostests/kmtests/include/kmt_test.h URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/include/kmt_test.…
============================================================================== --- trunk/rostests/kmtests/include/kmt_test.h [iso-8859-1] (original) +++ trunk/rostests/kmtests/include/kmt_test.h [iso-8859-1] Sun Sep 11 11:22:00 2011 @@ -129,6 +129,8 @@ VOID KmtTrace(PCSTR FileAndLine, PCSTR Format, ...) KMT_FORMAT(ms_printf, 2, 3); BOOLEAN KmtVSkip(INT Condition, PCSTR FileAndLine, PCSTR Format, va_list Arguments) KMT_FORMAT(ms_printf, 3, 0); BOOLEAN KmtSkip(INT Condition, PCSTR FileAndLine, PCSTR Format, ...) KMT_FORMAT(ms_printf, 3, 4); +PVOID KmtAllocateGuarded(SIZE_T SizeRequested); +VOID KmtFreeGuarded(PVOID Pointer); #ifdef KMT_KERNEL_MODE #define ok_irql(irql) ok(KeGetCurrentIrql() == irql, "IRQL is %d, expected %d\n", KeGetCurrentIrql(), irql) @@ -411,6 +413,44 @@ return Ret; } +PVOID KmtAllocateGuarded(SIZE_T SizeRequested) +{ + NTSTATUS Status; + SIZE_T Size = PAGE_ROUND_UP(SizeRequested + PAGE_SIZE); + PVOID VirtualMemory = NULL; + PCHAR StartOfBuffer; + + Status = ZwAllocateVirtualMemory(ZwCurrentProcess(), &VirtualMemory, 0, &Size, MEM_RESERVE, PAGE_NOACCESS); + + if (!NT_SUCCESS(Status)) + return NULL; + + Size -= PAGE_SIZE; + Status = ZwAllocateVirtualMemory(ZwCurrentProcess(), &VirtualMemory, 0, &Size, MEM_COMMIT, PAGE_READWRITE); + if (!NT_SUCCESS(Status)) + { + Size = 0; + Status = ZwFreeVirtualMemory(ZwCurrentProcess(), &VirtualMemory, &Size, MEM_RELEASE); + ok_eq_hex(Status, STATUS_SUCCESS); + return NULL; + } + + StartOfBuffer = VirtualMemory; + StartOfBuffer += Size - SizeRequested; + + return StartOfBuffer; +} + +VOID KmtFreeGuarded(PVOID Pointer) +{ + NTSTATUS Status; + PVOID VirtualMemory = (PVOID)PAGE_ROUND_DOWN((SIZE_T)Pointer); + SIZE_T Size = 0; + + Status = ZwFreeVirtualMemory(ZwCurrentProcess(), &VirtualMemory, &Size, MEM_RELEASE); + ok_eq_hex(Status, STATUS_SUCCESS); +} + #endif /* defined KMT_DEFINE_TEST_FUNCTIONS */ #endif /* !defined _KMTEST_TEST_H_ */ Modified: trunk/rostests/kmtests/kmtest.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/kmtest.rbuild?rev…
============================================================================== --- trunk/rostests/kmtests/kmtest.rbuild [iso-8859-1] (original) +++ trunk/rostests/kmtests/kmtest.rbuild [iso-8859-1] Sun Sep 11 11:22:00 2011 @@ -12,6 +12,7 @@ </directory> <directory name="example"> <file>Example_user.c</file> + <file>GuardedMemory.c</file> </directory> <directory name="ntos_io"> <file>IoDeviceObject_user.c</file> Modified: trunk/rostests/kmtests/kmtest_drv.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/kmtest_drv.rbuild…
============================================================================== --- trunk/rostests/kmtests/kmtest_drv.rbuild [iso-8859-1] (original) +++ trunk/rostests/kmtests/kmtest_drv.rbuild [iso-8859-1] Sun Sep 11 11:22:00 2011 @@ -12,6 +12,7 @@ </directory> <directory name="example"> <file>Example.c</file> + <file>GuardedMemory.c</file> <file>KernelType.c</file> </directory> <directory name="ntos_ex"> @@ -42,6 +43,9 @@ <file>KeIrql.c</file> <file>KeProcessor.c</file> <file>KeSpinLock.c</file> + </directory> + <directory name="ntos_mm"> + <file>MmSection.c</file> </directory> <directory name="ntos_ob"> <file>ObReference.c</file> Modified: trunk/rostests/kmtests/kmtest_drv/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/kmtest_drv/testli…
============================================================================== --- trunk/rostests/kmtests/kmtest_drv/testlist.c [iso-8859-1] (original) +++ trunk/rostests/kmtests/kmtest_drv/testlist.c [iso-8859-1] Sun Sep 11 11:22:00 2011 @@ -30,6 +30,7 @@ KMT_TESTFUNC Test_KeIrql; KMT_TESTFUNC Test_KeProcessor; KMT_TESTFUNC Test_KernelType; +KMT_TESTFUNC Test_MmSection; KMT_TESTFUNC Test_ObReference; KMT_TESTFUNC Test_ObType; KMT_TESTFUNC Test_ObTypeClean; @@ -63,6 +64,7 @@ { "KeIrql", Test_KeIrql }, { "-KeProcessor", Test_KeProcessor }, { "-KernelType", Test_KernelType }, + { "MmSection", Test_MmSection }, { "ObReference", Test_ObReference }, { "ObType", Test_ObType }, { "-ObTypeClean", Test_ObTypeClean }, Modified: trunk/rostests/kmtests/ntos_ex/ExDoubleList.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/ntos_ex/ExDoubleL…
============================================================================== --- trunk/rostests/kmtests/ntos_ex/ExDoubleList.c [iso-8859-1] (original) +++ trunk/rostests/kmtests/ntos_ex/ExDoubleList.c [iso-8859-1] Sun Sep 11 11:22:00 2011 @@ -6,9 +6,11 @@ */ struct _LIST_ENTRY; +#ifdef _X86_ struct _LIST_ENTRY *__stdcall ExInterlockedInsertHeadList(struct _LIST_ENTRY *, struct _LIST_ENTRY *, unsigned long *); struct _LIST_ENTRY *__stdcall ExInterlockedInsertTailList(struct _LIST_ENTRY *, struct _LIST_ENTRY *, unsigned long *); struct _LIST_ENTRY *__stdcall ExInterlockedRemoveHeadList(struct _LIST_ENTRY *, unsigned long *); +#endif #include <kmt_test.h> Modified: trunk/rostests/kmtests/ntos_ex/ExSequencedList.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/ntos_ex/ExSequenc…
============================================================================== --- trunk/rostests/kmtests/ntos_ex/ExSequencedList.c [iso-8859-1] (original) +++ trunk/rostests/kmtests/ntos_ex/ExSequencedList.c [iso-8859-1] Sun Sep 11 11:22:00 2011 @@ -13,7 +13,7 @@ #include <kmt_test.h> /* TODO: SLIST_HEADER is a lot different for x64 */ - +#ifndef _M_AMD64 #define CheckSListHeader(ListHead, ExpectedPointer, ExpectedDepth) do \ { \ ok_eq_pointer((ListHead)->Next.Next, ExpectedPointer); \ @@ -39,9 +39,11 @@ #undef ExInterlockedPopEntrySList #define TestXListFunctional TestSListFunctionalExports #include "ExXList.h" +#endif START_TEST(ExSequencedList) { +#ifndef _M_AMD64 PSLIST_HEADER ListHead; KSPIN_LOCK SpinLock; USHORT ExpectedSequence = 0; @@ -76,4 +78,5 @@ KeLowerIrql(Irql); ExFreePoolWithTag(Buffer, 'TLqS'); +#endif } Modified: trunk/rostests/kmtests/ntos_ex/ExSingleList.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/ntos_ex/ExSingleL…
============================================================================== --- trunk/rostests/kmtests/ntos_ex/ExSingleList.c [iso-8859-1] (original) +++ trunk/rostests/kmtests/ntos_ex/ExSingleList.c [iso-8859-1] Sun Sep 11 11:22:00 2011 @@ -6,8 +6,10 @@ */ struct _SINGLE_LIST_ENTRY; +#ifdef _X86_ struct _SINGLE_LIST_ENTRY *__stdcall ExInterlockedPushEntryList(struct _SINGLE_LIST_ENTRY *, struct _SINGLE_LIST_ENTRY *, unsigned long *); struct _SINGLE_LIST_ENTRY *__stdcall ExInterlockedPopEntryList(struct _SINGLE_LIST_ENTRY *, unsigned long *); +#endif #include <kmt_test.h> Modified: trunk/rostests/kmtests/ntos_ke/KeIrql.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/ntos_ke/KeIrql.c?…
============================================================================== --- trunk/rostests/kmtests/ntos_ke/KeIrql.c [iso-8859-1] (original) +++ trunk/rostests/kmtests/ntos_ke/KeIrql.c [iso-8859-1] Sun Sep 11 11:22:00 2011 @@ -7,6 +7,10 @@ __declspec(dllimport) void __stdcall KeRaiseIrql(unsigned char, unsigned char *); __declspec(dllimport) void __stdcall KeLowerIrql(unsigned char); +#ifdef _M_AMD64 +#define CLOCK1_LEVEL CLOCK_LEVEL +#define CLOCK2_LEVEL CLOCK_LEVEL +#endif #include <kmt_test.h> Added: trunk/rostests/kmtests/ntos_mm/MmSection.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/ntos_mm/MmSection…
============================================================================== --- trunk/rostests/kmtests/ntos_mm/MmSection.c (added) +++ trunk/rostests/kmtests/ntos_mm/MmSection.c [iso-8859-1] Sun Sep 11 11:22:00 2011 @@ -1,0 +1,98 @@ +/* + * PROJECT: ReactOS kernel-mode tests + * LICENSE: GPLv2+ - See COPYING in the top level directory + * PURPOSE: Kernel-Mode Test Suite Section Object test + * PROGRAMMER: Thomas Faber <thfabba(a)gmx.de> + */ + +#include <kmt_test.h> + +#define StartSeh() ExceptionStatus = STATUS_SUCCESS; _SEH2_TRY { +#define EndSeh(ExpectedStatus) } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { ExceptionStatus = _SEH2_GetExceptionCode(); } _SEH2_END; ok_eq_hex(ExceptionStatus, ExpectedStatus) + +START_TEST(MmSection) +{ + NTSTATUS Status = STATUS_SUCCESS; + NTSTATUS ExceptionStatus; + const PVOID InvalidPointer = (PVOID)0x5555555555555555LLU; + PVOID SectionObject; + LARGE_INTEGER MaximumSize; + + StartSeh() + Status = MmCreateSection(NULL, 0, NULL, NULL, 0, SEC_RESERVE, NULL, NULL); + EndSeh(STATUS_SUCCESS); + ok_eq_hex(Status, STATUS_INVALID_PAGE_PROTECTION); + + if (!KmtIsCheckedBuild) + { + /* PAGE_NOACCESS and missing SEC_RESERVE/SEC_COMMIT/SEC_IMAGE assert */ + StartSeh() + Status = MmCreateSection(NULL, 0, NULL, NULL, PAGE_NOACCESS, SEC_RESERVE, NULL, NULL); + EndSeh(STATUS_ACCESS_VIOLATION); + + StartSeh() + Status = MmCreateSection(NULL, 0, NULL, NULL, PAGE_NOACCESS, 0, NULL, NULL); + EndSeh(STATUS_ACCESS_VIOLATION); + } + + SectionObject = InvalidPointer; + StartSeh() + Status = MmCreateSection(&SectionObject, 0, NULL, NULL, 0, SEC_RESERVE, NULL, NULL); + EndSeh(STATUS_SUCCESS); + ok_eq_hex(Status, STATUS_INVALID_PAGE_PROTECTION); + ok_eq_pointer(SectionObject, InvalidPointer); + + StartSeh() + Status = MmCreateSection(NULL, 0, NULL, NULL, PAGE_READONLY, SEC_RESERVE, NULL, NULL); + EndSeh(STATUS_ACCESS_VIOLATION); + + SectionObject = InvalidPointer; + StartSeh() + Status = MmCreateSection(&SectionObject, 0, NULL, NULL, PAGE_READONLY, SEC_RESERVE, NULL, NULL); + EndSeh(STATUS_ACCESS_VIOLATION); + ok_eq_pointer(SectionObject, InvalidPointer); + + MaximumSize.QuadPart = 0; + StartSeh() + Status = MmCreateSection(NULL, 0, NULL, &MaximumSize, PAGE_READONLY, SEC_RESERVE, NULL, NULL); + EndSeh(STATUS_SUCCESS); + ok_eq_hex(Status, STATUS_INVALID_PARAMETER_4); + ok_eq_longlong(MaximumSize.QuadPart, 0LL); + + MaximumSize.QuadPart = 1; + StartSeh() + Status = MmCreateSection(NULL, 0, NULL, &MaximumSize, PAGE_READONLY, SEC_RESERVE, NULL, NULL); + EndSeh(STATUS_ACCESS_VIOLATION); + ok_eq_longlong(MaximumSize.QuadPart, 1LL); + + SectionObject = InvalidPointer; + MaximumSize.QuadPart = 0; + StartSeh() + Status = MmCreateSection(&SectionObject, 0, NULL, &MaximumSize, PAGE_READONLY, SEC_RESERVE, NULL, NULL); + EndSeh(STATUS_SUCCESS); + ok_eq_hex(Status, STATUS_INVALID_PARAMETER_4); + ok_eq_longlong(MaximumSize.QuadPart, 0LL); + ok_eq_pointer(SectionObject, InvalidPointer); + + SectionObject = InvalidPointer; + MaximumSize.QuadPart = 1; + StartSeh() + Status = MmCreateSection(&SectionObject, 0, NULL, &MaximumSize, PAGE_READONLY, SEC_RESERVE, NULL, NULL); + EndSeh(STATUS_SUCCESS); + ok_eq_hex(Status, STATUS_SUCCESS); + ok_eq_longlong(MaximumSize.QuadPart, 1LL); + ok(SectionObject != InvalidPointer, "Section object pointer untouched\n"); + ok(SectionObject != NULL, "Section object pointer NULL\n"); + + if (SectionObject && SectionObject != InvalidPointer) + ObDereferenceObject(SectionObject); + + SectionObject = InvalidPointer; + MaximumSize.QuadPart = 1; + StartSeh() + Status = MmCreateSection(&SectionObject, 0, NULL, &MaximumSize, PAGE_READONLY, SEC_IMAGE, NULL, NULL); + EndSeh(STATUS_SUCCESS); + ok_eq_hex(Status, STATUS_INVALID_FILE_FOR_SECTION); + ok_eq_longlong(MaximumSize.QuadPart, 1LL); + ok_eq_pointer(SectionObject, InvalidPointer); +} Propchange: trunk/rostests/kmtests/ntos_mm/MmSection.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/rostests/kmtests/readme.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/readme.txt?rev=53…
============================================================================== --- trunk/rostests/kmtests/readme.txt [iso-8859-1] (original) +++ trunk/rostests/kmtests/readme.txt [iso-8859-1] Sun Sep 11 11:22:00 2011 @@ -7,5 +7,5 @@ examples and templates. -See
http://www.reactos.org/wiki/User:ThFabba/KmtestsHowto
for more +See
http://www.reactos.org/wiki/KmtestsHowto
for more information and a guide on how to use the framework.
13 years, 3 months
1
0
0
0
[ekohl] 53686: [SERVICES] - Add optional asynchronous io code for service control pipes. This is disabled by default due to bugs in NPFS. - Read service pipe timeout value from the registry.
by ekohl@svn.reactos.org
Author: ekohl Date: Sun Sep 11 11:17:25 2011 New Revision: 53686 URL:
http://svn.reactos.org/svn/reactos?rev=53686&view=rev
Log: [SERVICES] - Add optional asynchronous io code for service control pipes. This is disabled by default due to bugs in NPFS. - Read service pipe timeout value from the registry. Modified: trunk/reactos/base/system/services/database.c Modified: trunk/reactos/base/system/services/database.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/datab…
============================================================================== --- trunk/reactos/base/system/services/database.c [iso-8859-1] (original) +++ trunk/reactos/base/system/services/database.c [iso-8859-1] Sun Sep 11 11:17:25 2011 @@ -23,6 +23,13 @@ */ // #define USE_SERVICE_START_PENDING +/* + * Uncomment the line below to use asynchronous IO operations + * on the service control pipes. + */ +// #define USE_ASYNCHRONOUS_IO + + /* GLOBALS *******************************************************************/ LIST_ENTRY ImageListHead; @@ -32,6 +39,8 @@ static DWORD dwResumeCount = 1; static CRITICAL_SECTION ControlServiceCriticalSection; +static DWORD dwPipeTimeout = 30000; /* 30 Seconds */ + /* FUNCTIONS *****************************************************************/ @@ -92,12 +101,16 @@ DPRINT("PipeName: %S\n", szControlPipeName); pServiceImage->hControlPipe = CreateNamedPipeW(szControlPipeName, +#ifdef USE_ASYNCHRONOUS_IO + PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED, +#else PIPE_ACCESS_DUPLEX, +#endif PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT, 100, 8000, 4, - 30000, + dwPipeTimeout, NULL); DPRINT("CreateNamedPipeW(%S) done\n", szControlPipeName); if (pServiceImage->hControlPipe == INVALID_HANDLE_VALUE) @@ -921,6 +934,10 @@ DWORD PacketSize; PWSTR Ptr; DWORD dwError = ERROR_SUCCESS; + BOOL bResult; +#ifdef USE_ASYNCHRONOUS_IO + OVERLAPPED Overlapped = {0, 0, 0, 0, 0}; +#endif DPRINT("ScmControlService() called\n"); @@ -951,20 +968,140 @@ ControlPacket->dwArgumentsCount = 0; ControlPacket->dwArgumentsOffset = 0; +#ifdef USE_ASYNCHRONOUS_IO + bResult = WriteFile(Service->lpImage->hControlPipe, + ControlPacket, + PacketSize, + &dwWriteCount, + &Overlapped); + if (bResult == FALSE) + { + DPRINT1("WriteFile() returned FALSE\n"); + + dwError = GetLastError(); + if (dwError == ERROR_IO_PENDING) + { + DPRINT1("dwError: ERROR_IO_PENDING\n"); + + dwError = WaitForSingleObject(Service->lpImage->hControlPipe, + dwPipeTimeout); + DPRINT1("WaitForSingleObject() returned %lu\n", dwError); + + if (dwError == WAIT_TIMEOUT) + { + bResult = CancelIo(Service->lpImage->hControlPipe); + if (bResult == FALSE) + { + DPRINT1("CancelIo() failed (Error: %lu)\n", GetLastError()); + } + + dwError = ERROR_SERVICE_REQUEST_TIMEOUT; + goto Done; + } + else if (dwError == ERROR_SUCCESS) + { + bResult = GetOverlappedResult(Service->lpImage->hControlPipe, + &Overlapped, + &dwWriteCount, + TRUE); + if (bResult == FALSE) + { + dwError = GetLastError(); + DPRINT1("GetOverlappedResult() failed (Error %lu)\n", dwError); + + goto Done; + } + } + } + else + { + DPRINT1("WriteFile() failed (Error %lu)\n", dwError); + goto Done; + } + } + + /* Read the reply */ + Overlapped.hEvent = (HANDLE) NULL; + + bResult = ReadFile(Service->lpImage->hControlPipe, + &ReplyPacket, + sizeof(SCM_REPLY_PACKET), + &dwReadCount, + &Overlapped); + if (bResult == FALSE) + { + DPRINT1("ReadFile() returned FALSE\n"); + + dwError = GetLastError(); + if (dwError == ERROR_IO_PENDING) + { + DPRINT1("dwError: ERROR_IO_PENDING\n"); + + dwError = WaitForSingleObject(Service->lpImage->hControlPipe, + dwPipeTimeout); + DPRINT1("WaitForSingleObject() returned %lu\n", dwError); + + if (dwError == WAIT_TIMEOUT) + { + bResult = CancelIo(Service->lpImage->hControlPipe); + if (bResult == FALSE) + { + DPRINT1("CancelIo() failed (Error: %lu)\n", GetLastError()); + } + + dwError = ERROR_SERVICE_REQUEST_TIMEOUT; + goto Done; + } + else if (dwError == ERROR_SUCCESS) + { + bResult = GetOverlappedResult(Service->lpImage->hControlPipe, + &Overlapped, + &dwReadCount, + TRUE); + if (bResult == FALSE) + { + dwError = GetLastError(); + DPRINT1("GetOverlappedResult() failed (Error %lu)\n", dwError); + + goto Done; + } + } + } + else + { + DPRINT1("ReadFile() failed (Error %lu)\n", dwError); + goto Done; + } + } + +#else /* Send the control packet */ - WriteFile(Service->lpImage->hControlPipe, - ControlPacket, - PacketSize, - &dwWriteCount, - NULL); + bResult = WriteFile(Service->lpImage->hControlPipe, + ControlPacket, + PacketSize, + &dwWriteCount, + NULL); + if (bResult == FALSE) + { + dwError = GetLastError(); + DPRINT("WriteFile() failed (Error %lu)\n", dwError); + goto Done; + } /* Read the reply */ - ReadFile(Service->lpImage->hControlPipe, - &ReplyPacket, - sizeof(SCM_REPLY_PACKET), - &dwReadCount, - NULL); - + bResult = ReadFile(Service->lpImage->hControlPipe, + &ReplyPacket, + sizeof(SCM_REPLY_PACKET), + &dwReadCount, + NULL); + if (bResult == FALSE) + { + dwError = GetLastError(); + DPRINT("ReadFile() failed (Error %lu)\n", dwError); + } +#endif + +Done: /* Release the contol packet */ HeapFree(GetProcessHeap(), 0, @@ -1004,6 +1141,10 @@ DWORD i; PWSTR *pOffPtr; PWSTR pArgPtr; + BOOL bResult; +#ifdef USE_ASYNCHRONOUS_IO + OVERLAPPED Overlapped = {0, 0, 0, 0, 0}; +#endif DPRINT("ScmSendStartCommand() called\n"); @@ -1066,20 +1207,140 @@ } } +#ifdef USE_ASYNCHRONOUS_IO + bResult = WriteFile(Service->lpImage->hControlPipe, + ControlPacket, + PacketSize, + &dwWriteCount, + &Overlapped); + if (bResult == FALSE) + { + DPRINT1("WriteFile() returned FALSE\n"); + + dwError = GetLastError(); + if (dwError == ERROR_IO_PENDING) + { + DPRINT1("dwError: ERROR_IO_PENDING\n"); + + dwError = WaitForSingleObject(Service->lpImage->hControlPipe, + dwPipeTimeout); + DPRINT1("WaitForSingleObject() returned %lu\n", dwError); + + if (dwError == WAIT_TIMEOUT) + { + bResult = CancelIo(Service->lpImage->hControlPipe); + if (bResult == FALSE) + { + DPRINT1("CancelIo() failed (Error: %lu)\n", GetLastError()); + } + + dwError = ERROR_SERVICE_REQUEST_TIMEOUT; + goto Done; + } + else if (dwError == ERROR_SUCCESS) + { + bResult = GetOverlappedResult(Service->lpImage->hControlPipe, + &Overlapped, + &dwWriteCount, + TRUE); + if (bResult == FALSE) + { + dwError = GetLastError(); + DPRINT1("GetOverlappedResult() failed (Error %lu)\n", dwError); + + goto Done; + } + } + } + else + { + DPRINT1("WriteFile() failed (Error %lu)\n", dwError); + goto Done; + } + } + + /* Read the reply */ + Overlapped.hEvent = (HANDLE) NULL; + + bResult = ReadFile(Service->lpImage->hControlPipe, + &ReplyPacket, + sizeof(SCM_REPLY_PACKET), + &dwReadCount, + &Overlapped); + if (bResult == FALSE) + { + DPRINT1("ReadFile() returned FALSE\n"); + + dwError = GetLastError(); + if (dwError == ERROR_IO_PENDING) + { + DPRINT1("dwError: ERROR_IO_PENDING\n"); + + dwError = WaitForSingleObject(Service->lpImage->hControlPipe, + dwPipeTimeout); + DPRINT1("WaitForSingleObject() returned %lu\n", dwError); + + if (dwError == WAIT_TIMEOUT) + { + bResult = CancelIo(Service->lpImage->hControlPipe); + if (bResult == FALSE) + { + DPRINT1("CancelIo() failed (Error: %lu)\n", GetLastError()); + } + + dwError = ERROR_SERVICE_REQUEST_TIMEOUT; + goto Done; + } + else if (dwError == ERROR_SUCCESS) + { + bResult = GetOverlappedResult(Service->lpImage->hControlPipe, + &Overlapped, + &dwReadCount, + TRUE); + if (bResult == FALSE) + { + dwError = GetLastError(); + DPRINT1("GetOverlappedResult() failed (Error %lu)\n", dwError); + + goto Done; + } + } + } + else + { + DPRINT1("ReadFile() failed (Error %lu)\n", dwError); + goto Done; + } + } + +#else /* Send the start command */ - WriteFile(Service->lpImage->hControlPipe, - ControlPacket, - PacketSize, - &dwWriteCount, - NULL); + bResult = WriteFile(Service->lpImage->hControlPipe, + ControlPacket, + PacketSize, + &dwWriteCount, + NULL); + if (bResult == FALSE) + { + dwError = GetLastError(); + DPRINT("WriteFile() failed (Error %lu)\n", dwError); + goto Done; + } /* Read the reply */ - ReadFile(Service->lpImage->hControlPipe, - &ReplyPacket, - sizeof(SCM_REPLY_PACKET), - &dwReadCount, - NULL); - + bResult = ReadFile(Service->lpImage->hControlPipe, + &ReplyPacket, + sizeof(SCM_REPLY_PACKET), + &dwReadCount, + NULL); + if (bResult == FALSE) + { + dwError = GetLastError(); + DPRINT("ReadFile() failed (Error %lu)\n", dwError); + } +#endif + +Done: /* Release the contol packet */ HeapFree(GetProcessHeap(), 0, @@ -1097,6 +1358,166 @@ static DWORD +ScmWaitForServiceConnect(PSERVICE Service) +{ + DWORD dwRead = 0; + DWORD dwProcessId = 0; + DWORD dwError = ERROR_SUCCESS; + BOOL bResult; +#ifdef USE_ASYNCHRONOUS_IO + OVERLAPPED Overlapped = {0, 0, 0, 0, 0}; +#endif + + DPRINT1("ScmWaitForServiceConnect()\n"); + +#ifdef USE_ASYNCHRONOUS_IO + Overlapped.hEvent = (HANDLE)NULL; + + bResult = ConnectNamedPipe(Service->lpImage->hControlPipe, + &Overlapped); + if (bResult == FALSE) + { + DPRINT1("ConnectNamedPipe() returned FALSE\n"); + + dwError = GetLastError(); + if (dwError == ERROR_IO_PENDING) + { + DPRINT1("dwError: ERROR_IO_PENDING\n"); + + dwError = WaitForSingleObject(Service->lpImage->hControlPipe, + dwPipeTimeout); + DPRINT1("WaitForSingleObject() returned %lu\n", dwError); + + if (dwError == WAIT_TIMEOUT) + { + bResult = CancelIo(Service->lpImage->hControlPipe); + if (bResult == FALSE) + { + DPRINT1("CancelIo() failed (Error: %lu)\n", GetLastError()); + } + + return ERROR_SERVICE_REQUEST_TIMEOUT; + } + else if (dwError == ERROR_SUCCESS) + { + bResult = GetOverlappedResult(Service->lpImage->hControlPipe, + &Overlapped, + &dwRead, + TRUE); + if (bResult == FALSE) + { + dwError = GetLastError(); + DPRINT1("GetOverlappedResult failed (Error %lu)\n", dwError); + + return dwError; + } + } + } + else if (dwError != ERROR_PIPE_CONNECTED) + { + DPRINT1("ConnectNamedPipe failed (Error %lu)\n", dwError); + return dwError; + } + } + + DPRINT1("Control pipe connected!\n"); + + Overlapped.hEvent = (HANDLE) NULL; + + /* Read the process id from pipe */ + bResult = ReadFile(Service->lpImage->hControlPipe, + (LPVOID)&dwProcessId, + sizeof(DWORD), + &dwRead, + &Overlapped); + if (bResult == FALSE) + { + DPRINT1("ReadFile() returned FALSE\n"); + + dwError = GetLastError(); + if (dwError == ERROR_IO_PENDING) + { + DPRINT1("dwError: ERROR_IO_PENDING\n"); + + dwError = WaitForSingleObject(Service->lpImage->hControlPipe, + dwPipeTimeout); + if (dwError == WAIT_TIMEOUT) + { + DPRINT1("WaitForSingleObject() returned WAIT_TIMEOUT\n"); + + bResult = CancelIo(Service->lpImage->hControlPipe); + if (bResult == FALSE) + { + DPRINT1("CancelIo() failed (Error: %lu)\n", GetLastError()); + } + + return ERROR_SERVICE_REQUEST_TIMEOUT; + } + else if (dwError == ERROR_SUCCESS) + { + DPRINT1("WaitForSingleObject() returned ERROR_SUCCESS\n"); + + DPRINT1("Process Id: %lu\n", dwProcessId); + + bResult = GetOverlappedResult(Service->lpImage->hControlPipe, + &Overlapped, + &dwRead, + TRUE); + if (bResult == FALSE) + { + dwError = GetLastError(); + DPRINT1("GetOverlappedResult() failed (Error %lu)\n", dwError); + + return dwError; + } + } + else + { + DPRINT1("WaitForSingleObject() returned %lu\n", dwError); + } + } + else + { + DPRINT1("ReadFile() failed (Error %lu)\n", dwError); + return dwError; + } + } + + DPRINT1("ScmWaitForServiceConnect() done\n"); + + return ERROR_SUCCESS; +#else + + /* Connect control pipe */ + if (ConnectNamedPipe(Service->lpImage->hControlPipe, NULL) ? + TRUE : (dwError = GetLastError()) == ERROR_PIPE_CONNECTED) + { + DPRINT("Control pipe connected!\n"); + + /* Read SERVICE_STATUS_HANDLE from pipe */ + bResult = ReadFile(Service->lpImage->hControlPipe, + (LPVOID)&dwProcessId, + sizeof(DWORD), + &dwRead, + NULL); + if (bResult == FALSE) + { + dwError = GetLastError(); + DPRINT1("Reading the service control pipe failed (Error %lu)\n", + dwError); + } + } + else + { + DPRINT1("Connecting control pipe failed! (Error %lu)\n", dwError); + } + + return dwError; +#endif +} + + +static DWORD ScmStartUserModeService(PSERVICE Service, DWORD argc, LPWSTR *argv) @@ -1105,7 +1526,6 @@ STARTUPINFOW StartupInfo; BOOL Result; DWORD dwError = ERROR_SUCCESS; - DWORD dwProcessId; DPRINT("ScmStartUserModeService(%p)\n", Service); @@ -1156,35 +1576,20 @@ ResumeThread(ProcessInformation.hThread); /* Connect control pipe */ - if (ConnectNamedPipe(Service->lpImage->hControlPipe, NULL) ? - TRUE : (dwError = GetLastError()) == ERROR_PIPE_CONNECTED) - { - DWORD dwRead = 0; - - DPRINT("Control pipe connected!\n"); - - /* Read SERVICE_STATUS_HANDLE from pipe */ - if (!ReadFile(Service->lpImage->hControlPipe, - (LPVOID)&dwProcessId, - sizeof(DWORD), - &dwRead, - NULL)) - { - dwError = GetLastError(); - DPRINT1("Reading the service control pipe failed (Error %lu)\n", - dwError); - } - else - { - DPRINT("Received service process ID %lu\n", dwProcessId); - - /* Send start command */ - dwError = ScmSendStartCommand(Service, argc, argv); - } + dwError = ScmWaitForServiceConnect(Service); + if (dwError == ERROR_SUCCESS) + { + /* Send start command */ + dwError = ScmSendStartCommand(Service, + argc, + argv); } else { DPRINT1("Connecting control pipe failed! (Error %lu)\n", dwError); + Service->lpImage->dwProcessId = 0; + Service->lpImage->hProcess = NULL; + CloseHandle(ProcessInformation.hProcess); } /* Close thread handle */ @@ -1531,7 +1936,29 @@ VOID ScmInitNamedPipeCriticalSection(VOID) { + HKEY hKey; + DWORD dwKeySize; + DWORD dwError; + InitializeCriticalSection(&ControlServiceCriticalSection); + + dwError = RegOpenKeyExW(HKEY_LOCAL_MACHINE, + L"SYSTEM\\CurrentControlSet\\Control", + 0, + KEY_READ, + &hKey); + if (dwError == ERROR_SUCCESS) + { + dwKeySize = sizeof(DWORD); + RegQueryValueExW(hKey, + L"ServicesPipeTimeout", + 0, + NULL, + (LPBYTE)&dwPipeTimeout, + &dwKeySize); + + RegCloseKey(hKey); + } }
13 years, 3 months
1
0
0
0
[tkreuzer] 53685: [HAL] - End the interrupt in HalpApcInterruptHandler and HalpDispatchInterruptHandler before calling the kernel, otherwise we would be stuck at high processor irql - Improve HalEn...
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun Sep 11 09:34:50 2011 New Revision: 53685 URL:
http://svn.reactos.org/svn/reactos?rev=53685&view=rev
Log: [HAL] - End the interrupt in HalpApcInterruptHandler and HalpDispatchInterruptHandler before calling the kernel, otherwise we would be stuck at high processor irql - Improve HalEnableSystemInterrupt - disable interrupts in HalpInitializeClock => APIC hal boots to desktop! Modified: trunk/reactos/hal/halx86/apic/apic.c trunk/reactos/hal/halx86/apic/apic.h trunk/reactos/hal/halx86/apic/rtctimer.c Modified: trunk/reactos/hal/halx86/apic/apic.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/apic/apic.c?rev…
============================================================================== --- trunk/reactos/hal/halx86/apic/apic.c [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/apic/apic.c [iso-8859-1] Sun Sep 11 09:34:50 2011 @@ -502,8 +502,11 @@ /* Save the old IRQL */ OldIrql = ApicGetCurrentIrql(); - /* Set APC_LEVEL */ + /* Raise to APC_LEVEL */ ApicSetCurrentIrql(APC_LEVEL); + + /* End the interrupt */ + ApicSendEOI(); /* Kernel or user APC? */ if (KiUserTrap(TrapFrame)) ProcessorMode = UserMode; @@ -520,37 +523,39 @@ /* Restore the old IRQL */ ApicSetCurrentIrql(OldIrql); + /* Exit the interrupt */ + KiEoiHelper(TrapFrame); +} + +#ifndef _M_AMD64 +VOID +DECLSPEC_NORETURN +FASTCALL +HalpDispatchInterruptHandler(IN PKTRAP_FRAME TrapFrame) +{ + KIRQL OldIrql; + ASSERT(ApicGetCurrentIrql() < DISPATCH_LEVEL); + ASSERT(ApicGetProcessorIrql() == DISPATCH_LEVEL); + + /* Enter trap */ + KiEnterInterruptTrap(TrapFrame); + + /* Save the old IRQL */ + OldIrql = ApicGetCurrentIrql(); + + /* Raise to DISPATCH_LEVEL */ + ApicSetCurrentIrql(DISPATCH_LEVEL); + /* End the interrupt */ ApicSendEOI(); - - /* Exit the interrupt */ - KiEoiHelper(TrapFrame); -} - -#ifndef _M_AMD64 -VOID -DECLSPEC_NORETURN -FASTCALL -HalpDispatchInterruptHandler(IN PKTRAP_FRAME TrapFrame) -{ - KIRQL OldIrql = ApicGetCurrentIrql(); - - ASSERT(OldIrql < DISPATCH_LEVEL); - ASSERT(ApicGetProcessorIrql() == DISPATCH_LEVEL); - - /* Enter trap */ - KiEnterInterruptTrap(TrapFrame); - - ApicSetCurrentIrql(DISPATCH_LEVEL); /* Enable interrupts and call the kernel's DPC interrupt handler */ _enable(); KiDispatchInterrupt(); _disable(); + /* Restore the old IRQL */ ApicSetCurrentIrql(OldIrql); - - ApicSendEOI(); /* Exit the interrupt */ KiEoiHelper(TrapFrame); @@ -604,20 +609,41 @@ ASSERT(Irql <= HIGH_LEVEL); ASSERT((IrqlToTpr(Irql) & 0xF0) == (Vector & 0xF0)); + /* Get the irq for this vector */ Index = HalpVectorToIndex[Vector]; - /* Read lower dword of redirection entry */ - ReDirReg.Long0 = IOApicRead(IOAPIC_REDTBL + 2 * Index); - - ReDirReg.Vector = Vector; - ReDirReg.DeliveryMode = APIC_MT_LowestPriority; - ReDirReg.DestinationMode = APIC_DM_Logical; - ReDirReg.Destination |= ApicLogicalId(Prcb->Number); - ReDirReg.TriggerMode = 1 - InterruptMode; + /* Check if its valid */ + if (Index == 0xff) + { + /* Interrupt is not in use */ + return FALSE; + } + + /* Read the redirection entry */ + ReDirReg = ApicReadIORedirectionEntry(Index); + + /* Check if the interrupt was unused */ + if (ReDirReg.Vector != Vector) + { + ReDirReg.Vector = Vector; + ReDirReg.DeliveryMode = APIC_MT_LowestPriority; + ReDirReg.DestinationMode = APIC_DM_Logical; + ReDirReg.Destination = 0; + ReDirReg.TriggerMode = 1 - InterruptMode; + } + + /* Check if the destination is logical */ + if (ReDirReg.DestinationMode = APIC_DM_Logical) + { + /* Set the bit for this cpu */ + ReDirReg.Destination |= ApicLogicalId(Prcb->Number); + } + + /* Now unmask it */ ReDirReg.Mask = FALSE; - /* Write back lower dword */ - IOApicWrite(IOAPIC_REDTBL + 2 * Irql, ReDirReg.Long0); + /* Write back the entry */ + ApicWriteIORedirectionEntry(Index, ReDirReg); return TRUE; } Modified: trunk/reactos/hal/halx86/apic/apic.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/apic/apic.h?rev…
============================================================================== --- trunk/reactos/hal/halx86/apic/apic.h [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/apic/apic.h [iso-8859-1] Sun Sep 11 09:34:50 2011 @@ -5,7 +5,7 @@ #define ZERO_VECTOR 0x00 // IRQL 00 #define APC_VECTOR 0x3D // IRQL 01 #define APIC_SPURIOUS_VECTOR 0x3f -#define DPC_VECTOR 0x41 // IRQL 02 +#define DISPATCH_VECTOR 0x41 // IRQL 02 #define APIC_GENERIC_VECTOR 0xC1 // IRQL 27 #define APIC_CLOCK_VECTOR 0xD1 // IRQL 28 #define APIC_SYNCH_VECTOR 0xD1 // IRQL 28 @@ -22,7 +22,7 @@ #define ZERO_VECTOR 0x00 // IRQL 00 #define APIC_SPURIOUS_VECTOR 0x1f #define APC_VECTOR 0x3D // IRQL 01 -#define DPC_VECTOR 0x41 // IRQL 02 +#define DISPATCH_VECTOR 0x41 // IRQL 02 #define APIC_GENERIC_VECTOR 0xC1 // IRQL 27 #define APIC_CLOCK_VECTOR 0xD1 // IRQL 28 #define APIC_SYNCH_VECTOR 0xD1 // IRQL 28 Modified: trunk/reactos/hal/halx86/apic/rtctimer.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/apic/rtctimer.c…
============================================================================== --- trunk/reactos/hal/halx86/apic/rtctimer.c [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/apic/rtctimer.c [iso-8859-1] Sun Sep 11 09:34:50 2011 @@ -36,12 +36,7 @@ VOID RtcSetClockRate(UCHAR ClockRate) { - ULONG_PTR EFlags; UCHAR RegisterA; - - /* Disable interrupts */ - EFlags = __readeflags(); - _disable(); /* Update the global values */ HalpCurrentRate = ClockRate; @@ -64,9 +59,6 @@ /* Release CMOS lock */ HalpReleaseCmosSpinLock(); - - /* Restore interrupts if they were previously enabled */ - __writeeflags(EFlags); } @@ -75,7 +67,13 @@ INIT_FUNCTION HalpInitializeClock(VOID) { + ULONG_PTR EFlags; UCHAR RegisterB; + + /* Save EFlags and disable interrupts */ + EFlags = __readeflags(); + _disable(); + // TODO: disable NMI /* Acquire CMOS lock */ @@ -91,9 +89,13 @@ /* Set initial rate */ RtcSetClockRate(HalpCurrentRate); + /* Restore interrupt state */ + __writeeflags(EFlags); + /* Notify the kernel about the maximum and minimum increment */ KeSetTimeIncrement(RtcClockRateToIncrement(RtcMaximumClockRate), RtcClockRateToIncrement(RtcMinimumClockRate)); + DPRINT1("Clock initialized\n"); }
13 years, 3 months
1
0
0
0
[tkreuzer] 53684: [KDCOM] Improve a debug print
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun Sep 11 08:56:38 2011 New Revision: 53684 URL:
http://svn.reactos.org/svn/reactos?rev=53684&view=rev
Log: [KDCOM] Improve a debug print Modified: trunk/reactos/drivers/base/kddll/kdcom.c Modified: trunk/reactos/drivers/base/kddll/kdcom.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/kddll/kdcom.c…
============================================================================== --- trunk/reactos/drivers/base/kddll/kdcom.c [iso-8859-1] (original) +++ trunk/reactos/drivers/base/kddll/kdcom.c [iso-8859-1] Sun Sep 11 08:56:38 2011 @@ -44,7 +44,7 @@ { ULONG Mode; - KDDBGPRINT("KdpPortInitialize\n"); + KDDBGPRINT("KdpPortInitialize, Port = COM%ld\n", ComPortNumber); /* Enable loop mode (set Bit 4 of the MCR) */ WRITE_PORT_UCHAR(ComPortBase + COM_MCR, MCR_LOOP);
13 years, 3 months
1
0
0
0
[ekohl] 53683: [MUP] Disable debug output.
by ekohl@svn.reactos.org
Author: ekohl Date: Sun Sep 11 08:52:59 2011 New Revision: 53683 URL:
http://svn.reactos.org/svn/reactos?rev=53683&view=rev
Log: [MUP] Disable debug output. Modified: trunk/reactos/drivers/filesystems/mup/create.c trunk/reactos/drivers/filesystems/mup/mup.c Modified: trunk/reactos/drivers/filesystems/mup/create.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/mup/cr…
============================================================================== --- trunk/reactos/drivers/filesystems/mup/create.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/mup/create.c [iso-8859-1] Sun Sep 11 08:52:59 2011 @@ -29,7 +29,7 @@ #include "mup.h" -//#define NDEBUG +#define NDEBUG #include <debug.h> /* FUNCTIONS ****************************************************************/ Modified: trunk/reactos/drivers/filesystems/mup/mup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/mup/mu…
============================================================================== --- trunk/reactos/drivers/filesystems/mup/mup.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/mup/mup.c [iso-8859-1] Sun Sep 11 08:52:59 2011 @@ -29,7 +29,7 @@ #include "mup.h" -//#define NDEBUG +#define NDEBUG #include <debug.h> /* GLOBALS *****************************************************************/
13 years, 3 months
1
0
0
0
[akhaldi] 53682: * Missed some assignments in debug.c. * Add a dummy allow_warnings() for msvc build.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Sep 11 00:44:13 2011 New Revision: 53682 URL:
http://svn.reactos.org/svn/reactos?rev=53682&view=rev
Log: * Missed some assignments in debug.c. * Add a dummy allow_warnings() for msvc build. Modified: trunk/reactos/cmake/msvc.cmake trunk/reactos/drivers/bus/pcix/debug.c Modified: trunk/reactos/cmake/msvc.cmake URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/msvc.cmake?rev=53682…
============================================================================== --- trunk/reactos/cmake/msvc.cmake [iso-8859-1] (original) +++ trunk/reactos/cmake/msvc.cmake [iso-8859-1] Sun Sep 11 00:44:13 2011 @@ -214,3 +214,6 @@ add_custom_target(${_target_name} ALL DEPENDS ${_binary_file}) endfunction() + +function(allow_warnings __module) +endfunction() Modified: trunk/reactos/drivers/bus/pcix/debug.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/pcix/debug.c?r…
============================================================================== --- trunk/reactos/drivers/bus/pcix/debug.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/pcix/debug.c [iso-8859-1] Sun Sep 11 00:44:13 2011 @@ -182,11 +182,11 @@ /* Choose the correct debug level based on which function this is */ if (IoStackLocation->MajorFunction == IRP_MJ_POWER) { - DebugLevel = 0x400; + //DebugLevel = 0x400; } else if (IoStackLocation->MajorFunction == IRP_MJ_PNP) { - DebugLevel = 0x100; + //DebugLevel = 0x100; } /* For an FDO, just dump the extension pointer and IRP string */
13 years, 3 months
1
0
0
0
[akhaldi] 53681: * Comment out some unused but set variables, remove some others.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Sep 11 00:40:20 2011 New Revision: 53681 URL:
http://svn.reactos.org/svn/reactos?rev=53681&view=rev
Log: * Comment out some unused but set variables, remove some others. Modified: trunk/reactos/base/applications/mscutils/servman/mainwnd.c trunk/reactos/base/applications/taskmgr/graph.c trunk/reactos/base/applications/taskmgr/taskmgr.c trunk/reactos/dll/cpl/desk/advmon.c trunk/reactos/drivers/bus/acpi/compbatt/compbatt.c trunk/reactos/drivers/bus/pcix/arb/ar_memio.c trunk/reactos/drivers/bus/pcix/arb/arb_comn.c trunk/reactos/drivers/bus/pcix/debug.c trunk/reactos/drivers/bus/pcix/pci/ppbridge.c trunk/reactos/drivers/directx/dxg/eng.c trunk/reactos/drivers/storage/class/disk/disk.c trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c trunk/reactos/drivers/storage/scsiport/scsiport.c trunk/reactos/drivers/video/displays/vga/objects/bitblt.c trunk/reactos/drivers/video/displays/vga/objects/paint.c trunk/reactos/drivers/video/displays/vga/vgavideo/vgavideo.c trunk/reactos/hal/halx86/acpi/halpnpdd.c trunk/reactos/hal/halx86/legacy/bus/pcibus.c trunk/reactos/lib/rtl/actctx.c trunk/reactos/lib/rtl/rangelist.c Modified: trunk/reactos/base/applications/mscutils/servman/mainwnd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mscutils…
============================================================================== --- trunk/reactos/base/applications/mscutils/servman/mainwnd.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/mscutils/servman/mainwnd.c [iso-8859-1] Sun Sep 11 00:40:20 2011 @@ -912,8 +912,8 @@ Info); if (hMainWnd == NULL) { - int ret; - ret = GetLastError(); + //int ret; + //ret = GetLastError(); GetError(); HeapFree(ProcessHeap, 0, Modified: trunk/reactos/base/applications/taskmgr/graph.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/…
============================================================================== --- trunk/reactos/base/applications/taskmgr/graph.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/taskmgr/graph.c [iso-8859-1] Sun Sep 11 00:40:20 2011 @@ -410,7 +410,7 @@ void Graph_DrawMemUsageHistoryGraph(HDC hDC, HWND hWnd) { RECT rcClient; - ULONGLONG CommitChargeLimit; + //ULONGLONG CommitChargeLimit; int i; static int offset = 0; @@ -430,7 +430,7 @@ /* * Get the memory usage */ - CommitChargeLimit = (ULONGLONG)PerfDataGetCommitChargeLimitK(); + //CommitChargeLimit = (ULONGLONG)PerfDataGetCommitChargeLimitK(); /* * Draw the graph background Modified: trunk/reactos/base/applications/taskmgr/taskmgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/…
============================================================================== --- trunk/reactos/base/applications/taskmgr/taskmgr.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/taskmgr/taskmgr.c [iso-8859-1] Sun Sep 11 00:40:20 2011 @@ -128,7 +128,6 @@ RECT rc; #endif LPRECT pRC; - int idctrl; LPNMHDR pnmh; WINDOWPLACEMENT wp; @@ -304,7 +303,6 @@ break; case WM_NOTIFY: - idctrl = (int)wParam; pnmh = (LPNMHDR)lParam; if ((pnmh->hwndFrom == hTabWnd) && (pnmh->idFrom == IDC_TAB) && @@ -772,11 +770,11 @@ void TaskManager_OnRestoreMainWindow(void) { - HMENU hMenu, hOptionsMenu; + //HMENU hMenu, hOptionsMenu; BOOL OnTop; - hMenu = GetMenu(hMainWnd); - hOptionsMenu = GetSubMenu(hMenu, OPTIONS_MENU_INDEX); + //hMenu = GetMenu(hMainWnd); + //hOptionsMenu = GetSubMenu(hMenu, OPTIONS_MENU_INDEX); OnTop = ((GetWindowLongPtrW(hMainWnd, GWL_EXSTYLE) & WS_EX_TOPMOST) != 0); OpenIcon(hMainWnd); Modified: trunk/reactos/dll/cpl/desk/advmon.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/advmon.c?rev=…
============================================================================== --- trunk/reactos/dll/cpl/desk/advmon.c [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/desk/advmon.c [iso-8859-1] Sun Sep 11 00:40:20 2011 @@ -88,11 +88,8 @@ IDataObject *pdo; #ifdef _MSC_VER HMODULE hShell32 = NULL; + CPSEAE msvc_SHCreatePropSheetExtArrayEx; #endif - CPSEAE msvc_SHCreatePropSheetExtArrayEx; - - /* silence gcc warning */ - msvc_SHCreatePropSheetExtArrayEx = NULL; /* FIXME: Build the "%s and %s" caption string for the monitor and adapter name */ szCaption[0] = _T('\0'); Modified: trunk/reactos/drivers/bus/acpi/compbatt/compbatt.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/compbatt/…
============================================================================== --- trunk/reactos/drivers/bus/acpi/compbatt/compbatt.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/acpi/compbatt/compbatt.c [iso-8859-1] Sun Sep 11 00:40:20 2011 @@ -488,7 +488,7 @@ BATTERY_INFORMATION BatteryInfo; BATTERY_REPORTING_SCALE BatteryGranularity[4]; PWCHAR BatteryName = L"Composite Battery"; - BATTERY_MANUFACTURE_DATE Date; + //BATTERY_MANUFACTURE_DATE Date; ULONG Dummy, Time; PVOID QueryData = NULL; ULONG QueryLength = 0; @@ -557,9 +557,9 @@ case BatteryManufactureDate: /* Static data */ - Date.Day = 26; - Date.Month = 06; - Date.Year = 1997; + //Date.Day = 26; + //Date.Month = 06; + //Date.Year = 1997; break; case BatteryTemperature: @@ -572,7 +572,6 @@ break; default: - /* Everything else is unknown */ Status = STATUS_INVALID_PARAMETER; break; Modified: trunk/reactos/drivers/bus/pcix/arb/ar_memio.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/pcix/arb/ar_me…
============================================================================== --- trunk/reactos/drivers/bus/pcix/arb/ar_memio.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/pcix/arb/ar_memio.c [iso-8859-1] Sun Sep 11 00:40:20 2011 @@ -97,7 +97,7 @@ { PPCI_ARBITER_INSTANCE PciArbiter; //PARBITER_INSTANCE CommonInstance; - NTSTATUS Status; + //NTSTATUS Status; /* Only valid for root FDOs who are being applied the hack for the first time */ ASSERT(!FdoExtension->BrokenVideoHackApplied); @@ -123,7 +123,7 @@ NULL); ASSERT(NT_SUCCESS(Status)); #else - Status = STATUS_SUCCESS; + //Status = STATUS_SUCCESS; UNIMPLEMENTED; while (TRUE); #endif Modified: trunk/reactos/drivers/bus/pcix/arb/arb_comn.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/pcix/arb/arb_c…
============================================================================== --- trunk/reactos/drivers/bus/pcix/arb/arb_comn.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/pcix/arb/arb_comn.c [iso-8859-1] Sun Sep 11 00:40:20 2011 @@ -127,7 +127,7 @@ IN PCM_RESOURCE_LIST Resources) { PPCI_PDO_EXTENSION PdoExtension; - CM_RESOURCE_TYPE DesiredType; + //CM_RESOURCE_TYPE DesiredType; PVOID Instance; PCI_SIGNATURE ArbiterType; @@ -162,12 +162,12 @@ if (ArbiterType == PciArb_Io) { /* I/O Port */ - DesiredType = CmResourceTypePort; + //DesiredType = CmResourceTypePort; } else if (ArbiterType == PciArb_Memory) { /* Device RAM */ - DesiredType = CmResourceTypeMemory; + //DesiredType = CmResourceTypeMemory; } else { Modified: trunk/reactos/drivers/bus/pcix/debug.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/pcix/debug.c?r…
============================================================================== --- trunk/reactos/drivers/bus/pcix/debug.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/pcix/debug.c [iso-8859-1] Sun Sep 11 00:40:20 2011 @@ -125,7 +125,8 @@ IN USHORT MaxMinor) { PPCI_PDO_EXTENSION PdoDeviceExtension; - ULONG BreakMask, DebugLevel = 0; + ULONG BreakMask; + //ULONG DebugLevel = 0; PCHAR IrpString; /* Only two functions are recognized */ @@ -161,11 +162,11 @@ /* Choose the correct debug level based on which function this is */ if (IoStackLocation->MajorFunction == IRP_MJ_POWER) { - DebugLevel = 0x500; + //DebugLevel = 0x500; } else if (IoStackLocation->MajorFunction == IRP_MJ_PNP) { - DebugLevel = 0x200; + //DebugLevel = 0x200; } /* For a PDO, print out the bus, device, and function number */ Modified: trunk/reactos/drivers/bus/pcix/pci/ppbridge.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/pcix/pci/ppbri…
============================================================================== --- trunk/reactos/drivers/bus/pcix/pci/ppbridge.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/pcix/pci/ppbridge.c [iso-8859-1] Sun Sep 11 00:40:20 2011 @@ -680,13 +680,13 @@ PPBridge_ChangeResourceSettings(IN PPCI_PDO_EXTENSION PdoExtension, IN PPCI_COMMON_HEADER PciData) { - BOOLEAN IoActive; + //BOOLEAN IoActive; PPCI_FDO_EXTENSION FdoExtension; PPCI_FUNCTION_RESOURCES PciResources; ULONG i; /* Check if I/O Decodes are enabled */ - IoActive = (PciData->u.type1.IOBase & 0xF) == 1; + //IoActive = (PciData->u.type1.IOBase & 0xF) == 1; /* * Check for Intel ICH PCI-to-PCI (i82801) bridges (used on the i810, Modified: trunk/reactos/drivers/directx/dxg/eng.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/directx/dxg/eng.c?…
============================================================================== --- trunk/reactos/drivers/directx/dxg/eng.c [iso-8859-1] (original) +++ trunk/reactos/drivers/directx/dxg/eng.c [iso-8859-1] Sun Sep 11 00:40:20 2011 @@ -31,11 +31,11 @@ DxDdUnlockDirectDrawSurface(PDD_SURFACE_LOCAL pSurface) { BOOL retVal = FALSE; - PEDD_SURFACE pEDDSurface = NULL; + //PEDD_SURFACE pEDDSurface = NULL; if (pSurface) { - pEDDSurface = (PEDD_SURFACE)( ((PBYTE)pSurface) - sizeof(DD_BASEOBJECT)); + // pEDDSurface = (PEDD_SURFACE)( ((PBYTE)pSurface) - sizeof(DD_BASEOBJECT)); // InterlockedDecrement(&pEDDSurface->pobj.cExclusiveLock); retVal = TRUE; } Modified: trunk/reactos/drivers/storage/class/disk/disk.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/class/disk…
============================================================================== --- trunk/reactos/drivers/storage/class/disk/disk.c [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/class/disk/disk.c [iso-8859-1] Sun Sep 11 00:40:20 2011 @@ -651,16 +651,16 @@ HANDLE handle; NTSTATUS status; PDEVICE_OBJECT deviceObject = NULL; - PDEVICE_OBJECT physicalDevice; + //PDEVICE_OBJECT physicalDevice; PDISK_GEOMETRY_EX diskGeometry = NULL; PDEVICE_EXTENSION deviceExtension = NULL; - PDEVICE_EXTENSION physicalDeviceExtension; + //PDEVICE_EXTENSION physicalDeviceExtension; UCHAR pathId = LunInfo->PathId; UCHAR targetId = LunInfo->TargetId; UCHAR lun = LunInfo->Lun; - BOOLEAN writeCache; + //BOOLEAN writeCache; PVOID senseData = NULL; - ULONG srbFlags; + //ULONG srbFlags; ULONG timeOut = 0; BOOLEAN srbListInitialized = FALSE; @@ -822,8 +822,8 @@ // This is the physical device object. // - physicalDevice = deviceObject; - physicalDeviceExtension = deviceExtension; + //physicalDevice = deviceObject; + //physicalDeviceExtension = deviceExtension; // // Save address of port driver capabilities. @@ -874,7 +874,7 @@ LunInfo, PortCapabilities); - srbFlags = deviceExtension->SrbFlags; + //srbFlags = deviceExtension->SrbFlags; // // Allocate buffer for drive geometry. @@ -966,7 +966,7 @@ DisableWriteCache(deviceObject,LunInfo); - writeCache = deviceExtension->DeviceFlags & DEV_WRITE_CACHE; + //writeCache = deviceExtension->DeviceFlags & DEV_WRITE_CACHE; // // NOTE: At this point one device object has been successfully created. Modified: trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/class/ramd…
============================================================================== --- trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/class/ramdisk/ramdisk.c [iso-8859-1] Sun Sep 11 00:40:20 2011 @@ -403,7 +403,8 @@ IN BOOLEAN ValidateOnly, OUT PRAMDISK_DRIVE_EXTENSION *NewDriveExtension) { - ULONG BasePage, ViewCount, DiskType, Length; + ULONG BasePage, DiskType, Length; + //ULONG ViewCount; NTSTATUS Status; PDEVICE_OBJECT DeviceObject; PRAMDISK_DRIVE_EXTENSION DriveExtension; @@ -456,11 +457,11 @@ // return STATUS_INVALID_PARAMETER; } - + // // Read the view count instead // - ViewCount = Input->ViewCount; + //ViewCount = Input->ViewCount; // // Sanitize disk options @@ -1288,11 +1289,11 @@ IN PIRP Irp) { PRAMDISK_DRIVE_EXTENSION DeviceExtension; - ULONG Length; - LARGE_INTEGER ByteOffset; + //ULONG Length; + //LARGE_INTEGER ByteOffset; PIO_STACK_LOCATION IoStackLocation; NTSTATUS Status, ReturnStatus; - + // // Get the device extension and make sure this isn't a bus // @@ -1310,8 +1311,8 @@ // Capture parameters // IoStackLocation = IoGetCurrentIrpStackLocation(Irp); - Length = IoStackLocation->Parameters.Read.Length; - ByteOffset = IoStackLocation->Parameters.Read.ByteOffset; + //Length = IoStackLocation->Parameters.Read.Length; + //ByteOffset = IoStackLocation->Parameters.Read.ByteOffset; // // FIXME: Validate offset Modified: trunk/reactos/drivers/storage/scsiport/scsiport.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/scsiport/s…
============================================================================== --- trunk/reactos/drivers/storage/scsiport/scsiport.c [iso-8859-1] (original) +++ trunk/reactos/drivers/storage/scsiport/scsiport.c [iso-8859-1] Sun Sep 11 00:40:20 2011 @@ -1836,13 +1836,11 @@ IN ULONG ErrorCode, IN ULONG UniqueId) { - PSCSI_PORT_DEVICE_EXTENSION DeviceExtension; + //PSCSI_PORT_DEVICE_EXTENSION DeviceExtension; DPRINT1("ScsiPortLogError() called\n"); - DeviceExtension = CONTAINING_RECORD(HwDeviceExtension, - SCSI_PORT_DEVICE_EXTENSION, - MiniPortDeviceExtension); + //DeviceExtension = CONTAINING_RECORD(HwDeviceExtension, SCSI_PORT_DEVICE_EXTENSION, MiniPortDeviceExtension); DPRINT("ScsiPortLogError() done\n"); @@ -4209,7 +4207,7 @@ PSCSI_PORT_LUN_EXTENSION LunExtension; LONG Result; PIRP Irp; - ULONG SequenceNumber; + //ULONG SequenceNumber; Srb = SrbInfo->Srb; Irp = Srb->OriginalRequest; @@ -4309,7 +4307,7 @@ /* Save transfer length in the IRP */ Irp->IoStatus.Information = Srb->DataTransferLength; - SequenceNumber = SrbInfo->SequenceNumber; + //SequenceNumber = SrbInfo->SequenceNumber; SrbInfo->SequenceNumber = 0; /* Decrement the queue count */ @@ -4577,7 +4575,6 @@ IN PVOID ServiceContext) { PSCSI_PORT_DEVICE_EXTENSION DeviceExtension; - BOOLEAN Result; DPRINT("ScsiPortIsr() called!\n"); @@ -4588,7 +4585,7 @@ return FALSE; /* Call miniport's HwInterrupt routine */ - Result = DeviceExtension->HwInterrupt(&DeviceExtension->MiniPortDeviceExtension); + DeviceExtension->HwInterrupt(&DeviceExtension->MiniPortDeviceExtension); /* If flag of notification is set - queue a DPC */ if (DeviceExtension->InterruptData.Flags & SCSI_PORT_NOTIFICATION_NEEDED) Modified: trunk/reactos/drivers/video/displays/vga/objects/bitblt.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/displays/vga…
============================================================================== --- trunk/reactos/drivers/video/displays/vga/objects/bitblt.c [iso-8859-1] (original) +++ trunk/reactos/drivers/video/displays/vga/objects/bitblt.c [iso-8859-1] Sun Sep 11 00:40:20 2011 @@ -86,7 +86,7 @@ UCHAR *GDIpos, *initial; /* Used by the temporary DFB */ - DEVSURF DestDevSurf; + //DEVSURF DestDevSurf; /* FIXME: Optimize to retrieve entire bytes at a time (see ../vgavideo/vgavideo.c:vgaGetByte) */ @@ -97,11 +97,10 @@ if (ColorTranslation == NULL) { /* Prepare a Dest Dev Target and copy from the DFB to the DIB */ - DestDevSurf.NextScan = Dest->lDelta; - DestDevSurf.StartBmp = Dest->pvScan0; + //DestDevSurf.NextScan = Dest->lDelta; + //DestDevSurf.StartBmp = Dest->pvScan0; DIB_BltFromVGA(SourcePoint->x, SourcePoint->y, dx, dy, Dest->pvScan0, Dest->lDelta); - } else { Modified: trunk/reactos/drivers/video/displays/vga/objects/paint.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/displays/vga…
============================================================================== --- trunk/reactos/drivers/video/displays/vga/objects/paint.c [iso-8859-1] (original) +++ trunk/reactos/drivers/video/displays/vga/objects/paint.c [iso-8859-1] Sun Sep 11 00:40:20 2011 @@ -11,11 +11,10 @@ BOOL VGADDIFillSolid(SURFOBJ *Surface, RECTL Dimensions, ULONG iColor) { int x, y, x2, y2, w, h, j; - ULONG offset, pre1; - ULONG orgpre1, orgx, midpre1, tmppre1; + ULONG orgx, pre1, midpre1, tmppre1; + //ULONG offset, orgpre1; int ileftpix, imidpix, irightpix; /* double leftpix, midpix, rightpix;*/ - UCHAR a; /* Swap dimensions so that x, y are at topmost left */ if ( Dimensions.right < Dimensions.left ) @@ -46,7 +45,7 @@ DPRINT("VGADDIFillSolid: x:%d, y:%d, w:%d, h:%d\n", x, y, w, h); /* Calculate the starting offset */ - offset = xconv[x]+y80[y]; + //offset = xconv[x]+y80[y]; /* Make a note of original x */ orgx = x; @@ -57,7 +56,7 @@ imidpix = (w-ileftpix-irightpix) / 8; pre1 = xconv[(x-1)&~7] + y80[y]; - orgpre1=pre1; + //orgpre1=pre1; /* check for overlap ( very horizontally skinny rect ) */ if ( (ileftpix+irightpix) > w ) @@ -70,7 +69,7 @@ tmppre1 = pre1; for ( j = y; j < y+h; j++ ) { - a = READ_REGISTER_UCHAR ( vidmem+tmppre1 ); + READ_REGISTER_UCHAR ( vidmem+tmppre1 ); WRITE_REGISTER_UCHAR ( vidmem+tmppre1, iColor ); tmppre1 += 80; } @@ -86,7 +85,7 @@ tmppre1 = pre1; for ( j = y; j < y+h; j++ ) { - a = READ_REGISTER_UCHAR(vidmem + tmppre1); + READ_REGISTER_UCHAR(vidmem + tmppre1); WRITE_REGISTER_UCHAR(vidmem + tmppre1, iColor); tmppre1 += 80; } @@ -120,7 +119,7 @@ for ( j = y; j < y+h; j++ ) { - a = READ_REGISTER_UCHAR(vidmem + pre1); + READ_REGISTER_UCHAR(vidmem + pre1); WRITE_REGISTER_UCHAR(vidmem + pre1, iColor); pre1 += 80; } Modified: trunk/reactos/drivers/video/displays/vga/vgavideo/vgavideo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/displays/vga…
============================================================================== --- trunk/reactos/drivers/video/displays/vga/vgavideo/vgavideo.c [iso-8859-1] (original) +++ trunk/reactos/drivers/video/displays/vga/vgavideo/vgavideo.c [iso-8859-1] Sun Sep 11 00:40:20 2011 @@ -163,14 +163,13 @@ VOID vgaPutPixel(INT x, INT y, UCHAR c) { ULONG offset; - UCHAR a; offset = xconv[x]+y80[y]; WRITE_PORT_UCHAR((PUCHAR)GRA_I,0x08); WRITE_PORT_UCHAR((PUCHAR)GRA_D,maskbit[x]); - a = READ_REGISTER_UCHAR(vidmem + offset); + READ_REGISTER_UCHAR(vidmem + offset); WRITE_REGISTER_UCHAR(vidmem + offset, c); } @@ -231,9 +230,8 @@ BOOL vgaHLine(INT x, INT y, INT len, UCHAR c) { - UCHAR a; - ULONG pre1; - ULONG orgpre1, orgx, midpre1; + ULONG orgx, pre1, midpre1; + //ULONG orgpre1; LONG ileftpix, imidpix, irightpix; orgx = x; @@ -252,7 +250,7 @@ imidpix = (len-ileftpix-irightpix) / 8; pre1 = xconv[(x-1)&~7] + y80[y]; - orgpre1=pre1; + //orgpre1=pre1; /* check for overlap ( very short line ) */ if ( (ileftpix+irightpix) > len ) @@ -262,7 +260,7 @@ WRITE_PORT_UCHAR((PUCHAR)GRA_I,0x08); // set the mask WRITE_PORT_UCHAR((PUCHAR)GRA_D,mask); - a = READ_REGISTER_UCHAR(vidmem + pre1); + READ_REGISTER_UCHAR(vidmem + pre1); WRITE_REGISTER_UCHAR(vidmem + pre1, c); return TRUE; @@ -275,7 +273,7 @@ WRITE_PORT_UCHAR((PUCHAR)GRA_I,0x08); // set the mask WRITE_PORT_UCHAR((PUCHAR)GRA_D,startmasks[ileftpix]); - a = READ_REGISTER_UCHAR(vidmem + pre1); + READ_REGISTER_UCHAR(vidmem + pre1); WRITE_REGISTER_UCHAR(vidmem + pre1, c); /* Prepare new x for the middle */ @@ -300,7 +298,7 @@ /* Write right pixels */ WRITE_PORT_UCHAR((PUCHAR)GRA_I,0x08); // set the mask bits WRITE_PORT_UCHAR((PUCHAR)GRA_D, endmasks[irightpix]); - a = READ_REGISTER_UCHAR(vidmem + pre1); + READ_REGISTER_UCHAR(vidmem + pre1); WRITE_REGISTER_UCHAR(vidmem + pre1, c); } @@ -310,7 +308,6 @@ BOOL vgaVLine(INT x, INT y, INT len, UCHAR c) { INT offset, i; - UCHAR a; offset = xconv[x]+y80[y]; @@ -323,7 +320,7 @@ for(i=y; i<y+len; i++) { - a = READ_REGISTER_UCHAR(vidmem + offset); + READ_REGISTER_UCHAR(vidmem + offset); WRITE_REGISTER_UCHAR(vidmem + offset, c); offset += 80; } @@ -453,7 +450,6 @@ LONG x2 = x + w; LONG y2 = y + h; ULONG offset; - UCHAR a; for (i = x; i < x2; i++) { @@ -467,7 +463,7 @@ { for (j = y; j < y2; j++) { - a = READ_REGISTER_UCHAR(vidmem + offset); + READ_REGISTER_UCHAR(vidmem + offset); WRITE_REGISTER_UCHAR(vidmem + offset, (*pb & 0xf0) >> 4); offset += 80; pb += Source_lDelta; @@ -477,7 +473,7 @@ { for (j = y; j < y2; j++) { - a = READ_REGISTER_UCHAR(vidmem + offset); + READ_REGISTER_UCHAR(vidmem + offset); WRITE_REGISTER_UCHAR(vidmem + offset, *pb & 0x0f); offset += 80; pb += Source_lDelta; @@ -498,7 +494,6 @@ ULONG x2 = x + w; ULONG y2 = y + h; ULONG offset; - UCHAR a; for (i = x; i < x2; i++) { @@ -512,7 +507,7 @@ { for (j = y; j < y2; j++) { - a = READ_REGISTER_UCHAR(vidmem + offset); + READ_REGISTER_UCHAR(vidmem + offset); WRITE_REGISTER_UCHAR(vidmem + offset, XLATEOBJ_iXlate(Xlate, (*pb & 0xf0) >> 4)); offset += 80; pb += Source_lDelta; @@ -522,7 +517,7 @@ { for (j = y; j < y2; j++) { - a = READ_REGISTER_UCHAR(vidmem + offset); + READ_REGISTER_UCHAR(vidmem + offset); WRITE_REGISTER_UCHAR(vidmem + offset, XLATEOBJ_iXlate(Xlate, *pb & 0x0f)); offset += 80; pb += Source_lDelta; @@ -660,15 +655,15 @@ { unsigned char *bp; unsigned char *vp; - unsigned char init_mask; + //unsigned char init_mask; volatile unsigned char dummy; - int byte_per_line; + //int byte_per_line; int i, j, off, init_off = x&7; bp = b; ASSIGNVP4(x, y, vp) - ASSIGNMK4(x, y, init_mask) - byte_per_line = SCREEN_X >> 3; + //ASSIGNMK4(x, y, init_mask) + //byte_per_line = SCREEN_X >> 3; WRITE_PORT_UCHAR((PUCHAR)GRA_I, 0x05); // write mode 2 WRITE_PORT_UCHAR((PUCHAR)GRA_D, 0x02); @@ -795,7 +790,7 @@ unsigned char *bp, *bpX; unsigned char *vp, *vpX; unsigned char mask; - volatile unsigned char dummy; + //volatile unsigned char dummy; int byte_per_line; int i, j; @@ -817,7 +812,7 @@ vp = vpX; for (j = h; j > 0; j--) { - dummy = *vp; + //dummy = *vp; *vp = *bp; bp += bw; vp += byte_per_line; @@ -838,7 +833,7 @@ unsigned char *bp, *bpX; unsigned char *vp, *vpX; unsigned char mask; - volatile unsigned char dummy; + //volatile unsigned char dummy; int byte_per_line; int i, j; @@ -862,7 +857,7 @@ { if (*bp != Trans) { - dummy = *vp; + //dummy = *vp; *vp = *bp; } bp += bw; Modified: trunk/reactos/hal/halx86/acpi/halpnpdd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/acpi/halpnpdd.c…
============================================================================== --- trunk/reactos/hal/halx86/acpi/halpnpdd.c [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/acpi/halpnpdd.c [iso-8859-1] Sun Sep 11 00:40:20 2011 @@ -282,12 +282,12 @@ HalpQueryCapabilities(IN PDEVICE_OBJECT DeviceObject, OUT PDEVICE_CAPABILITIES Capabilities) { - PPDO_EXTENSION PdoExtension; + //PPDO_EXTENSION PdoExtension; NTSTATUS Status; PAGED_CODE(); /* Get the extension and check for valid version */ - PdoExtension = DeviceObject->DeviceExtension; + //PdoExtension = DeviceObject->DeviceExtension; ASSERT(Capabilities->Version == 1); if (Capabilities->Version == 1) { @@ -619,7 +619,7 @@ IN PIRP Irp) { PIO_STACK_LOCATION IoStackLocation; - PPDO_EXTENSION PdoExtension; + //PPDO_EXTENSION PdoExtension; PFDO_EXTENSION FdoExtension; NTSTATUS Status; UCHAR Minor; @@ -691,8 +691,7 @@ { /* This is a PDO instead */ ASSERT(FdoExtension->ExtensionType == PdoExtensionType); - PdoExtension = (PPDO_EXTENSION)FdoExtension; - + //PdoExtension = (PPDO_EXTENSION)FdoExtension; /* Query the IRP type */ Status = STATUS_SUCCESS; switch (Minor) Modified: trunk/reactos/hal/halx86/legacy/bus/pcibus.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/legacy/bus/pcib…
============================================================================== --- trunk/reactos/hal/halx86/legacy/bus/pcibus.c [iso-8859-1] (original) +++ trunk/reactos/hal/halx86/legacy/bus/pcibus.c [iso-8859-1] Sun Sep 11 00:40:20 2011 @@ -311,7 +311,7 @@ PCI_SLOT_NUMBER MultiSlot; PPCIPBUSDATA BusData = (PPCIPBUSDATA)BusHandler->BusData; UCHAR HeaderType; - ULONG Device; + //ULONG Device; /* Simple validation */ if (Slot.u.bits.Reserved) return FALSE; @@ -321,7 +321,7 @@ if (!Slot.u.bits.FunctionNumber) return TRUE; /* Functions 0+ need Multi-Function support, so check the slot */ - Device = Slot.u.bits.DeviceNumber; + //Device = Slot.u.bits.DeviceNumber; MultiSlot = Slot; MultiSlot.u.bits.FunctionNumber = 0; Modified: trunk/reactos/lib/rtl/actctx.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/actctx.c?rev=53681…
============================================================================== --- trunk/reactos/lib/rtl/actctx.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/actctx.c [iso-8859-1] Sun Sep 11 00:40:20 2011 @@ -2825,10 +2825,11 @@ FASTCALL RtlDeactivateActivationContextUnsafeFast(IN PRTL_CALLER_ALLOCATED_ACTIVATION_CONTEXT_STACK_FRAME_EXTENDED Frame) { - RTL_ACTIVATION_CONTEXT_STACK_FRAME *frame, *top; + RTL_ACTIVATION_CONTEXT_STACK_FRAME *frame; + //RTL_ACTIVATION_CONTEXT_STACK_FRAME *top; /* find the right frame */ - top = NtCurrentTeb()->ActivationContextStackPointer->ActiveFrame; + //top = NtCurrentTeb()->ActivationContextStackPointer->ActiveFrame; frame = &Frame->Frame; if (!frame) Modified: trunk/reactos/lib/rtl/rangelist.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/rangelist.c?rev=53…
============================================================================== --- trunk/reactos/lib/rtl/rangelist.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/rangelist.c [iso-8859-1] Sun Sep 11 00:40:20 2011 @@ -57,7 +57,7 @@ IN PVOID Owner OPTIONAL) { PRTL_RANGE_ENTRY RangeEntry; - PRTL_RANGE_ENTRY Previous; + //PRTL_RANGE_ENTRY Previous; PRTL_RANGE_ENTRY Current; PLIST_ENTRY Entry; @@ -91,7 +91,7 @@ } else { - Previous = NULL; + //Previous = NULL; Entry = RangeList->ListHead.Flink; while (Entry != &RangeList->ListHead) { @@ -108,7 +108,7 @@ return STATUS_SUCCESS; } - Previous = Current; + //Previous = Current; Entry = Entry->Flink; }
13 years, 3 months
1
0
0
0
← Newer
1
...
20
21
22
23
24
25
26
...
40
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
Results per page:
10
25
50
100
200