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
June 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
25 participants
460 discussions
Start a n
N
ew thread
[akhaldi] 52052: [CMAKE] * Add a missing dependency.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Wed Jun 1 22:08:27 2011 New Revision: 52052 URL:
http://svn.reactos.org/svn/reactos?rev=52052&view=rev
Log: [CMAKE] * Add a missing dependency. Modified: branches/cmake-bringup/boot/freeldr/freeldr/CMakeLists.txt Modified: branches/cmake-bringup/boot/freeldr/freeldr/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/boot/freeldr/free…
============================================================================== --- branches/cmake-bringup/boot/freeldr/freeldr/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/boot/freeldr/freeldr/CMakeLists.txt [iso-8859-1] Wed Jun 1 22:08:27 2011 @@ -154,6 +154,7 @@ set_source_files_properties(${FREELDR_ARCH_SOURCE} PROPERTIES COMPILE_DEFINITIONS "_NTHAL_;_BLDR_;_NTSYSTEM_") add_library(freeldr_arch ${FREELDR_ARCH_SOURCE}) +add_dependencies(freeldr_arch bugcodes) list(APPEND FREELDR_SOURCE bootmgr.c
13 years, 6 months
1
0
0
0
[akhaldi] 52051: [CMAKE] * Improve static libs creation in *nix. Dedicated to arty.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Wed Jun 1 22:05:24 2011 New Revision: 52051 URL:
http://svn.reactos.org/svn/reactos?rev=52051&view=rev
Log: [CMAKE] * Improve static libs creation in *nix. Dedicated to arty. Modified: branches/cmake-bringup/gcc.cmake branches/cmake-bringup/toolchain-mingw32.cmake Modified: branches/cmake-bringup/gcc.cmake URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/gcc.cmake?rev=520…
============================================================================== --- branches/cmake-bringup/gcc.cmake [iso-8859-1] (original) +++ branches/cmake-bringup/gcc.cmake [iso-8859-1] Wed Jun 1 22:05:24 2011 @@ -18,10 +18,6 @@ "<CMAKE_C_COMPILER> -DRC_INVOKED -D__WIN32__=1 -D__FLAT__=1 <DEFINES> -I${REACTOS_SOURCE_DIR}/include/psdk -I${REACTOS_BINARY_DIR}/include/psdk -I${REACTOS_SOURCE_DIR}/include/ -I${REACTOS_SOURCE_DIR}/include/reactos -I${REACTOS_BINARY_DIR}/include/reactos -I${REACTOS_SOURCE_DIR}/include/reactos/wine -I${REACTOS_SOURCE_DIR}/include/crt -I${REACTOS_SOURCE_DIR}/include/crt/mingw32 -xc -E <SOURCE> -o <OBJECT>" "${WRC} -i <OBJECT> -o <OBJECT>" "<CMAKE_RC_COMPILER> -i <OBJECT> -J res -O coff -o <OBJECT>") - -if(NOT CMAKE_HOST_SYSTEM_NAME MATCHES Windows) - set(CMAKE_C_CREATE_STATIC_LIBRARY "<CMAKE_AR> crs <TARGET> <LINK_FLAGS> <OBJECTS>") -endif() # Compiler Core add_definitions(-pipe -fms-extensions) Modified: branches/cmake-bringup/toolchain-mingw32.cmake URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/toolchain-mingw32…
============================================================================== --- branches/cmake-bringup/toolchain-mingw32.cmake [iso-8859-1] (original) +++ branches/cmake-bringup/toolchain-mingw32.cmake [iso-8859-1] Wed Jun 1 22:05:24 2011 @@ -35,6 +35,13 @@ set(CMAKE_ASM_COMPILER ${MINGW_PREFIX}gcc) set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -x assembler-with-cpp -o <OBJECT> -I${REACTOS_SOURCE_DIR}/include/asm -I${REACTOS_BINARY_DIR}/include/asm <FLAGS> <DEFINES> -D__ASM__ -c <SOURCE>") +set(CMAKE_AR ${MINGW_PREFIX}ar) +if(NOT CMAKE_HOST_SYSTEM_NAME MATCHES Windows) + set(CMAKE_C_CREATE_STATIC_LIBRARY "${CMAKE_AR} crs <TARGET> <LINK_FLAGS> <OBJECTS>") + set(CMAKE_CXX_CREATE_STATIC_LIBRARY ${CMAKE_C_CREATE_STATIC_LIBRARY}) + set(CMAKE_ASM_CREATE_STATIC_LIBRARY ${CMAKE_C_CREATE_STATIC_LIBRARY}) +endif() + # Use stdcall fixups, and don't link with anything by default unless we say so set(CMAKE_C_STANDARD_LIBRARIES "-lgcc" CACHE STRING "Standard C Libraries")
13 years, 6 months
1
0
0
0
[tkreuzer] 52050: [NTOSKRNL] Merge r52027 from cmake branch: * Several improvements to debug symbols handling. * A new (killer/awesome/...etc) feature has been introduced to kdbg: argument values s...
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Wed Jun 1 20:36:40 2011 New Revision: 52050 URL:
http://svn.reactos.org/svn/reactos?rev=52050&view=rev
Log: [NTOSKRNL] Merge r52027 from cmake branch: * Several improvements to debug symbols handling. * A new (killer/awesome/...etc) feature has been introduced to kdbg: argument values support. Now backtraces contain not only usermode and kernelmode addresses translated, but also the argument values passed to the functions along the trace. * Brought to you by the Arty. * works only with cmake builds Modified: trunk/reactos/ (props changed) trunk/reactos/drivers/wdm/audio/backpln/portcls/ (props changed) trunk/reactos/include/reactos/rossym.h trunk/reactos/lib/rossym_new/CMakeLists.txt trunk/reactos/lib/rossym_new/compat.h trunk/reactos/lib/rossym_new/dwarf.h trunk/reactos/lib/rossym_new/dwarfabbrev.c trunk/reactos/lib/rossym_new/dwarfaranges.c trunk/reactos/lib/rossym_new/dwarfcfa.c trunk/reactos/lib/rossym_new/dwarfget.c trunk/reactos/lib/rossym_new/dwarfinfo.c trunk/reactos/lib/rossym_new/dwarfopen.c trunk/reactos/lib/rossym_new/dwarfpc.c trunk/reactos/lib/rossym_new/find.c trunk/reactos/lib/rossym_new/fromfile.c trunk/reactos/lib/rossym_new/initum.c trunk/reactos/lib/rossym_new/pe.c trunk/reactos/lib/rossym_new/pe.h trunk/reactos/lib/rossym_new/rossympriv.h trunk/reactos/ntoskrnl/include/internal/kd.h trunk/reactos/ntoskrnl/kdbg/i386/i386-dis.c trunk/reactos/ntoskrnl/kdbg/kdb_cli.c trunk/reactos/ntoskrnl/kdbg/kdb_symbols.c trunk/reactos/ntoskrnl/kdbg/kdb_symbols.cmake.c trunk/reactos/ntoskrnl/ke/bug.c [This mail would be too long, it was shortened to contain the URLs only.] Modified: trunk/reactos/include/reactos/rossym.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/rossym.h?r…
Modified: trunk/reactos/lib/rossym_new/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rossym_new/CMakeLists.…
Modified: trunk/reactos/lib/rossym_new/compat.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rossym_new/compat.h?re…
Modified: trunk/reactos/lib/rossym_new/dwarf.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rossym_new/dwarf.h?rev…
Modified: trunk/reactos/lib/rossym_new/dwarfabbrev.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rossym_new/dwarfabbrev…
Modified: trunk/reactos/lib/rossym_new/dwarfaranges.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rossym_new/dwarfarange…
Modified: trunk/reactos/lib/rossym_new/dwarfcfa.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rossym_new/dwarfcfa.c?…
Modified: trunk/reactos/lib/rossym_new/dwarfget.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rossym_new/dwarfget.c?…
Modified: trunk/reactos/lib/rossym_new/dwarfinfo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rossym_new/dwarfinfo.c…
Modified: trunk/reactos/lib/rossym_new/dwarfopen.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rossym_new/dwarfopen.c…
Modified: trunk/reactos/lib/rossym_new/dwarfpc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rossym_new/dwarfpc.c?r…
Modified: trunk/reactos/lib/rossym_new/find.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rossym_new/find.c?rev=…
Modified: trunk/reactos/lib/rossym_new/fromfile.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rossym_new/fromfile.c?…
Modified: trunk/reactos/lib/rossym_new/initum.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rossym_new/initum.c?re…
Modified: trunk/reactos/lib/rossym_new/pe.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rossym_new/pe.c?rev=52…
Modified: trunk/reactos/lib/rossym_new/pe.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rossym_new/pe.h?rev=52…
Modified: trunk/reactos/lib/rossym_new/rossympriv.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rossym_new/rossympriv.…
Modified: trunk/reactos/ntoskrnl/include/internal/kd.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
Modified: trunk/reactos/ntoskrnl/kdbg/i386/i386-dis.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kdbg/i386/i386-di…
Modified: trunk/reactos/ntoskrnl/kdbg/kdb_cli.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kdbg/kdb_cli.c?re…
Modified: trunk/reactos/ntoskrnl/kdbg/kdb_symbols.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kdbg/kdb_symbols.…
Modified: trunk/reactos/ntoskrnl/kdbg/kdb_symbols.cmake.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kdbg/kdb_symbols.…
Modified: trunk/reactos/ntoskrnl/ke/bug.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/bug.c?rev=5205…
13 years, 6 months
1
0
0
0
[jgardou] 52049: [CMAKE] - clean up wine directx build file. Wine removed COM from wind3d
by jgardou@svn.reactos.org
Author: jgardou Date: Wed Jun 1 19:45:03 2011 New Revision: 52049 URL:
http://svn.reactos.org/svn/reactos?rev=52049&view=rev
Log: [CMAKE] - clean up wine directx build file. Wine removed COM from wind3d Modified: trunk/reactos/dll/directx/wine/d3d8/CMakeLists.txt trunk/reactos/dll/directx/wine/d3d9/CMakeLists.txt trunk/reactos/dll/directx/wine/wined3d/CMakeLists.txt Modified: trunk/reactos/dll/directx/wine/d3d8/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3d8/CMak…
============================================================================== --- trunk/reactos/dll/directx/wine/d3d8/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/d3d8/CMakeLists.txt [iso-8859-1] Wed Jun 1 19:45:03 2011 @@ -29,7 +29,6 @@ volume.c volumetexture.c version.rc - #${REACTOS_BINARY_DIR}/include/reactos/wine/wined3d_i.c ${CMAKE_CURRENT_BINARY_DIR}/d3d8.def) add_library(d3d8 SHARED ${SOURCE}) Modified: trunk/reactos/dll/directx/wine/d3d9/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/d3d9/CMak…
============================================================================== --- trunk/reactos/dll/directx/wine/d3d9/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/d3d9/CMakeLists.txt [iso-8859-1] Wed Jun 1 19:45:03 2011 @@ -31,7 +31,6 @@ volume.c volumetexture.c version.rc - #${REACTOS_BINARY_DIR}/include/reactos/wine/wined3d_i.c ${CMAKE_CURRENT_BINARY_DIR}/d3d9_stubs.c ${CMAKE_CURRENT_BINARY_DIR}/d3d9.def) Modified: trunk/reactos/dll/directx/wine/wined3d/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/wine/wined3d/C…
============================================================================== --- trunk/reactos/dll/directx/wine/wined3d/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/dll/directx/wine/wined3d/CMakeLists.txt [iso-8859-1] Wed Jun 1 19:45:03 2011 @@ -55,7 +55,7 @@ add_library(wined3d SHARED ${SOURCE}) set_module_type(wined3d win32dll) -target_link_libraries(wined3d wine uuid) +target_link_libraries(wined3d wine) add_importlibs(wined3d user32
13 years, 6 months
1
0
0
0
[cgutman] 52048: [UMPNPMGR] - Handle more GUIDs
by cgutman@svn.reactos.org
Author: cgutman Date: Wed Jun 1 19:44:03 2011 New Revision: 52048 URL:
http://svn.reactos.org/svn/reactos?rev=52048&view=rev
Log: [UMPNPMGR] - Handle more GUIDs Modified: trunk/reactos/base/services/umpnpmgr/umpnpmgr.c Modified: trunk/reactos/base/services/umpnpmgr/umpnpmgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/umpnpmgr/ump…
============================================================================== --- trunk/reactos/base/services/umpnpmgr/umpnpmgr.c [iso-8859-1] (original) +++ trunk/reactos/base/services/umpnpmgr/umpnpmgr.c [iso-8859-1] Wed Jun 1 19:44:03 2011 @@ -2965,6 +2965,30 @@ DPRINT1("Device arrival: %S\n", PnpEvent->TargetDevice.DeviceIds); /* FIXME: ? */ } + else if (UuidEqual(&PnpEvent->EventGuid, (UUID*)&GUID_DEVICE_EJECT_VETOED, &RpcStatus)) + { + DPRINT1("Eject vetoed: %S\n", PnpEvent->TargetDevice.DeviceIds); + } + else if (UuidEqual(&PnpEvent->EventGuid, (UUID*)&GUID_DEVICE_KERNEL_INITIATED_EJECT, &RpcStatus)) + { + DPRINT1("Kernel initiated eject: %S\n", PnpEvent->TargetDevice.DeviceIds); + } + else if (UuidEqual(&PnpEvent->EventGuid, (UUID*)&GUID_DEVICE_SAFE_REMOVAL, &RpcStatus)) + { + DPRINT1("Safe removal: %S\n", PnpEvent->TargetDevice.DeviceIds); + } + else if (UuidEqual(&PnpEvent->EventGuid, (UUID*)&GUID_DEVICE_SURPRISE_REMOVAL, &RpcStatus)) + { + DPRINT1("Surprise removal: %S\n", PnpEvent->TargetDevice.DeviceIds); + } + else if (UuidEqual(&PnpEvent->EventGuid, (UUID*)&GUID_DEVICE_REMOVAL_VETOED, &RpcStatus)) + { + DPRINT1("Removal vetoed: %S\n", PnpEvent->TargetDevice.DeviceIds); + } + else if (UuidEqual(&PnpEvent->EventGuid, (UUID*)&GUID_DEVICE_REMOVE_PENDING, &RpcStatus)) + { + DPRINT1("Removal pending: %S\n", PnpEvent->TargetDevice.DeviceIds); + } else { DPRINT1("Unknown event, GUID {%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}\n",
13 years, 6 months
1
0
0
0
[tkreuzer] 52047: [CMD] replace FILE IO with Memory IO functions for batch files Patch by HansH (hans at atbas dot org) See issue #5807 for more details.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Wed Jun 1 19:33:20 2011 New Revision: 52047 URL:
http://svn.reactos.org/svn/reactos?rev=52047&view=rev
Log: [CMD] replace FILE IO with Memory IO functions for batch files Patch by HansH (hans at atbas dot org) See issue #5807 for more details. Modified: trunk/reactos/base/shell/cmd/batch.c trunk/reactos/base/shell/cmd/batch.h trunk/reactos/base/shell/cmd/goto.c Modified: trunk/reactos/base/shell/cmd/batch.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/batch.c?rev…
============================================================================== --- trunk/reactos/base/shell/cmd/batch.c [iso-8859-1] (original) +++ trunk/reactos/base/shell/cmd/batch.c [iso-8859-1] Wed Jun 1 19:33:20 2011 @@ -156,6 +156,22 @@ return dp; } +/* + * free the allocated memory of a batch file + */ +VOID ClearBatch() +{ + TRACE ("ClearBatch mem = %08x free = %d\n", bc->mem, bc->memfree); + + if (bc->mem && bc->memfree) + cmd_free(bc->mem); + + if (bc->raw_params) + cmd_free(bc->raw_params); + + if (bc->params) + cmd_free(bc->params); +} /* * If a batch file is current, exits it, freeing the context block and @@ -169,19 +185,9 @@ VOID ExitBatch() { + ClearBatch(); + TRACE ("ExitBatch\n"); - - if (bc->hBatchFile) - { - CloseHandle (bc->hBatchFile); - bc->hBatchFile = INVALID_HANDLE_VALUE; - } - - if (bc->raw_params) - cmd_free(bc->raw_params); - - if (bc->params) - cmd_free(bc->params); UndoRedirection(bc->RedirList, NULL); FreeRedirection(bc->RedirList); @@ -195,6 +201,33 @@ bc = bc->prev; } +/* + * Load batch file into memory + * + */ +void BatchFile2Mem(HANDLE hBatchFile) +{ + TRACE ("BatchFile2Mem ()\n"); + + bc->memsize = GetFileSize(hBatchFile, NULL); + bc->mem = (char *)cmd_alloc(bc->memsize+1); /* 1 extra for '\0' */ + + /* if memory is available, read it in and close the file */ + if (bc->mem != NULL) + { + TRACE ("BatchFile2Mem memory %08x - %08x\n",bc->mem,bc->memsize); + SetFilePointer (hBatchFile, 0, NULL, FILE_BEGIN); + ReadFile(hBatchFile, (LPVOID)bc->mem, bc->memsize, &bc->memsize, NULL); + bc->mem[bc->memsize]='\0'; /* end this, so you can dump it as a string */ + bc->memfree=TRUE; /* this one needs to be freed */ + } + else + { + bc->memsize=0; /* this will prevent mem being accessed */ + bc->memfree=FALSE; + } + bc->mempos = 0; /* set position to the start */ +} /* * Start batch file execution @@ -209,31 +242,37 @@ LPFOR_CONTEXT saved_fc; INT i; INT ret = 0; - - HANDLE hFile; + BOOL same_fn = FALSE; + + HANDLE hFile = 0; SetLastError(0); - hFile = CreateFile (fullname, GENERIC_READ, FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE, NULL, - OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | - FILE_FLAG_SEQUENTIAL_SCAN, NULL); - - TRACE ("Batch: (\'%s\', \'%s\', \'%s\') hFile = %x\n", - debugstr_aw(fullname), debugstr_aw(firstword), debugstr_aw(param), hFile); - - if (hFile == INVALID_HANDLE_VALUE) - { - ConErrResPuts(STRING_BATCH_ERROR); - return 1; - } - + if (bc && bc->mem) + { + TCHAR fpname[MAX_PATH]; + GetFullPathName(fullname, sizeof(fpname) / sizeof(TCHAR), fpname, NULL); + if (_tcsicmp(bc->BatchFilePath,fpname)==0) + same_fn=TRUE; + } + TRACE ("Batch: (\'%s\', \'%s\', \'%s\') same_fn = %d\n", + debugstr_aw(fullname), debugstr_aw(firstword), debugstr_aw(param), same_fn); + + if (!same_fn) + { + hFile = CreateFile (fullname, GENERIC_READ, FILE_SHARE_WRITE | FILE_SHARE_READ | FILE_SHARE_DELETE, NULL, + OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | + FILE_FLAG_SEQUENTIAL_SCAN, NULL); + + if (hFile == INVALID_HANDLE_VALUE) + { + ConErrResPuts(STRING_BATCH_ERROR); + return 1; + } + } + if (bc != NULL && Cmd == bc->current) { /* Then we are transferring to another batch */ - CloseHandle (bc->hBatchFile); - bc->hBatchFile = INVALID_HANDLE_VALUE; - if (bc->params) - cmd_free (bc->params); - if (bc->raw_params) - cmd_free (bc->raw_params); + ClearBatch(); AddBatchRedirection(&Cmd->Redirections); } else @@ -261,15 +300,27 @@ /* Create a new context. This function will not * return until this context has been exited */ new.prev = bc; + /* copy some fields in the new structure if it is the same file */ + if (same_fn) { + new.mem = bc->mem; + new.memsize = bc->memsize; + new.mempos = 0; + new.memfree = FALSE; /* don't free this, being used before this */ + } bc = &new; bc->RedirList = NULL; bc->setlocal = setlocal; } GetFullPathName(fullname, sizeof(bc->BatchFilePath) / sizeof(TCHAR), bc->BatchFilePath, NULL); - - bc->hBatchFile = hFile; - SetFilePointer (bc->hBatchFile, 0, NULL, FILE_BEGIN); + /* if a new batch file, load it into memory and close the file */ + if (!same_fn) + { + BatchFile2Mem(hFile); + CloseHandle(hFile); + } + + bc->mempos = 0; /* goto begin of batch file */ bc->bEcho = bEcho; /* Preserve echo across batch calls */ for (i = 0; i < 10; i++) bc->shiftlevel[i] = i; @@ -340,6 +391,49 @@ } /* + * Read a single line from the batch file from the current batch/memory position. + * Almost a copy of FileGetString with same UNICODE handling + */ +BOOL BatchGetString (LPTSTR lpBuffer, INT nBufferLength) +{ + LPSTR lpString; + INT len = 0; +#ifdef _UNICODE + lpString = cmd_alloc(nBufferLength); +#else + lpString = lpBuffer; +#endif + /* read all chars from memory until a '\n' is encountered */ + if (bc->mem) + { + for (; (bc->mempos < bc->memsize && len < (nBufferLength-1)); len++) + { + lpString[len] = bc->mem[bc->mempos++]; + if (lpString[len] == '\n' ) + { + len++; + break; + } + } + } + + if (!len) + { +#ifdef _UNICODE + cmd_free(lpString); +#endif + return FALSE; + } + + lpString[len++] = '\0'; +#ifdef _UNICODE + MultiByteToWideChar(OutputCodePage, 0, lpString, -1, lpBuffer, len); + cmd_free(lpString); +#endif + return TRUE; +} + +/* * Read and return the next executable line form the current batch file * * If no batch file is current or no further executable lines are found @@ -347,7 +441,6 @@ * * Set eflag to 0 if line is not to be echoed else 1 */ - LPTSTR ReadBatchLine () { TRACE ("ReadBatchLine ()\n"); @@ -360,7 +453,7 @@ return NULL; } - if (!FileGetString (bc->hBatchFile, textline, sizeof (textline) / sizeof (textline[0]) - 1)) + if (!BatchGetString (textline, sizeof (textline) / sizeof (textline[0]) - 1)) { TRACE ("ReadBatchLine(): Reached EOF!\n"); /* End of file.... */ Modified: trunk/reactos/base/shell/cmd/batch.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/batch.h?rev…
============================================================================== --- trunk/reactos/base/shell/cmd/batch.h [iso-8859-1] (original) +++ trunk/reactos/base/shell/cmd/batch.h [iso-8859-1] Wed Jun 1 19:33:20 2011 @@ -9,7 +9,10 @@ typedef struct tagBATCHCONTEXT { struct tagBATCHCONTEXT *prev; - HANDLE hBatchFile; + char *mem; /* batchfile content in memory */ + DWORD memsize; /* size of batchfile */ + DWORD mempos; /* current position to read from */ + BOOL memfree; /* true if it need to be freed when exitbatch is called */ TCHAR BatchFilePath[MAX_PATH]; LPTSTR params; LPTSTR raw_params; /* Holds the raw params given by the input */ @@ -47,5 +50,6 @@ LPTSTR BatchParams (LPTSTR, LPTSTR); VOID ExitBatch (VOID); INT Batch (LPTSTR, LPTSTR, LPTSTR, PARSED_COMMAND *); +BOOL BatchGetString (LPTSTR lpBuffer, INT nBufferLength); LPTSTR ReadBatchLine(VOID); -VOID AddBatchRedirection(REDIRECTION **); +VOID AddBatchRedirection(REDIRECTION **); Modified: trunk/reactos/base/shell/cmd/goto.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/goto.c?rev=…
============================================================================== --- trunk/reactos/base/shell/cmd/goto.c [iso-8859-1] (original) +++ trunk/reactos/base/shell/cmd/goto.c [iso-8859-1] Wed Jun 1 19:33:20 2011 @@ -74,14 +74,14 @@ /* jump to end of the file */ if ( _tcsicmp( param, _T(":eof"))==0) { - SetFilePointer (bc->hBatchFile, 0, &lNewPosHigh, FILE_END); + bc->mempos=bc->memsize; /* position at the end of the batchfile */ return 0; } /* jump to begin of the file */ - SetFilePointer (bc->hBatchFile, 0, &lNewPosHigh, FILE_BEGIN); + bc->mempos=0; - while (FileGetString (bc->hBatchFile, textline, sizeof(textline) / sizeof(textline[0]))) + while (BatchGetString (textline, sizeof(textline) / sizeof(textline[0]))) { int pos; int size;
13 years, 6 months
1
0
0
0
[cgutman] 52046: [NTOSKRNL] - Massive rework of device removal - IRP_MN_QUERY_REMOVE_DEVICE is sent to all devices that will be removed in response to a removal/ejection - If any of the IRP_MN_QUER...
by cgutman@svn.reactos.org
Author: cgutman Date: Wed Jun 1 19:32:12 2011 New Revision: 52046 URL:
http://svn.reactos.org/svn/reactos?rev=52046&view=rev
Log: [NTOSKRNL] - Massive rework of device removal - IRP_MN_QUERY_REMOVE_DEVICE is sent to all devices that will be removed in response to a removal/ejection - If any of the IRP_MN_QUERY_REMOVE_DEVICE requests fail, all devices which received a IRP_MN_QUERY_REMOVE_DEVICE will receive IRP_MN_CANCEL_REMOVE_DEVICE - If everything approves the remove request, IRP_MN_REMOVE_DEVICE will be sent to children, ejection and/or removal relations, and finally the device itself - Handle removal relations for all devices not just 1st level devices - Remove child devices before removing the parent - Move GUID_DEVICE_REMOVE_PENDING and GUID_DEVICE_REMOVAL_VETOED notifications to IopQueryRemoveDevice - Implement IopCancelRemoveDevice which sends IRP_MN_CANCEL_REMOVE_DEVICE to the driver stack and sends GUID_TARGET_DEVICE_REMOVE_CANCELLED to any drivers waiting on target device change - Use the IopRemoveDevice function to remove devices instead of calling IopQueryRemoveDevice and IopSendRemoveDevice manually so removal and/or ejection relations and children are processed - IRPs and PnP notifications sent upon device removal (surprise and safe) should now be compatible with XP/Vista/7 Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.…
============================================================================== --- trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c [iso-8859-1] Wed Jun 1 19:32:12 2011 @@ -45,6 +45,12 @@ IN ULONG CreateOptions, OUT PHANDLE Handle); +VOID +IopCancelPrepareDeviceForRemoval(PDEVICE_OBJECT DeviceObject); + +NTSTATUS +IopPrepareDeviceForRemoval(PDEVICE_OBJECT DeviceObject); + PDEVICE_NODE FASTCALL IopGetDeviceNode(PDEVICE_OBJECT DeviceObject) @@ -125,6 +131,7 @@ return STATUS_SUCCESS; } +static NTSTATUS NTAPI IopSendEject(IN PDEVICE_OBJECT DeviceObject) @@ -139,6 +146,7 @@ return IopSynchronousCall(DeviceObject, &Stack, &Dummy); } +static VOID NTAPI IopSendSurpriseRemoval(IN PDEVICE_OBJECT DeviceObject) @@ -154,13 +162,20 @@ IopSynchronousCall(DeviceObject, &Stack, &Dummy); } +static NTSTATUS NTAPI IopQueryRemoveDevice(IN PDEVICE_OBJECT DeviceObject) { + PDEVICE_NODE DeviceNode = IopGetDeviceNode(DeviceObject); IO_STACK_LOCATION Stack; PVOID Dummy; NTSTATUS Status; + + ASSERT(DeviceNode); + + IopQueueTargetDeviceEvent(&GUID_DEVICE_REMOVE_PENDING, + &DeviceNode->InstancePath); RtlZeroMemory(&Stack, sizeof(IO_STACK_LOCATION)); Stack.MajorFunction = IRP_MJ_PNP; @@ -173,10 +188,18 @@ &GUID_TARGET_DEVICE_QUERY_REMOVE, NULL, NULL); + + if (!NT_SUCCESS(Status)) + { + DPRINT1("Removal vetoed by %wZ\n", &DeviceNode->InstancePath); + IopQueueTargetDeviceEvent(&GUID_DEVICE_REMOVAL_VETOED, + &DeviceNode->InstancePath); + } return Status; } +static NTSTATUS NTAPI IopQueryStopDevice(IN PDEVICE_OBJECT DeviceObject) @@ -191,6 +214,7 @@ return IopSynchronousCall(DeviceObject, &Stack, &Dummy); } +static VOID NTAPI IopSendRemoveDevice(IN PDEVICE_OBJECT DeviceObject) @@ -212,6 +236,29 @@ NULL); } +static +VOID +NTAPI +IopCancelRemoveDevice(IN PDEVICE_OBJECT DeviceObject) +{ + IO_STACK_LOCATION Stack; + PVOID Dummy; + + RtlZeroMemory(&Stack, sizeof(IO_STACK_LOCATION)); + Stack.MajorFunction = IRP_MJ_PNP; + Stack.MinorFunction = IRP_MN_CANCEL_REMOVE_DEVICE; + + /* Drivers should never fail a IRP_MN_CANCEL_REMOVE_DEVICE request */ + IopSynchronousCall(DeviceObject, &Stack, &Dummy); + + IopNotifyPlugPlayNotification(DeviceObject, + EventCategoryTargetDeviceChange, + &GUID_TARGET_DEVICE_REMOVE_CANCELLED, + NULL, + NULL); +} + +static VOID NTAPI IopSendStopDevice(IN PDEVICE_OBJECT DeviceObject) @@ -257,7 +304,7 @@ if (!NT_SUCCESS(Status)) { /* Send an IRP_MN_REMOVE_DEVICE request */ - IopSendRemoveDevice(DeviceObject); + IopRemoveDevice(DeviceNode); /* Set the appropriate flag */ DeviceNode->Flags |= DNF_START_FAILED; @@ -3721,7 +3768,7 @@ DeviceNode->Flags &= ~(DNF_STARTED | DNF_START_REQUEST_PENDING); DeviceNode->Flags |= DNF_START_FAILED; - IopSendRemoveDevice(PhysicalDeviceObject); + IopRemoveDevice(DeviceNode); } } } @@ -3881,8 +3928,213 @@ return Status; } +static NTSTATUS -NTAPI +IopQueryRemoveChildDevices(PDEVICE_NODE ParentDeviceNode) +{ + PDEVICE_NODE ChildDeviceNode, NextDeviceNode, FailedRemoveDevice; + NTSTATUS Status; + KIRQL OldIrql; + + KeAcquireSpinLock(&IopDeviceTreeLock, &OldIrql); + ChildDeviceNode = ParentDeviceNode->Child; + while (ChildDeviceNode != NULL) + { + NextDeviceNode = ChildDeviceNode->Sibling; + KeReleaseSpinLock(&IopDeviceTreeLock, OldIrql); + + Status = IopPrepareDeviceForRemoval(ChildDeviceNode->PhysicalDeviceObject); + if (!NT_SUCCESS(Status)) + { + FailedRemoveDevice = ChildDeviceNode; + goto cleanup; + } + + KeAcquireSpinLock(&IopDeviceTreeLock, &OldIrql); + ChildDeviceNode = NextDeviceNode; + } + KeReleaseSpinLock(&IopDeviceTreeLock, OldIrql); + + return STATUS_SUCCESS; + +cleanup: + KeAcquireSpinLock(&IopDeviceTreeLock, &OldIrql); + ChildDeviceNode = ParentDeviceNode->Child; + while (ChildDeviceNode != NULL) + { + NextDeviceNode = ChildDeviceNode->Sibling; + KeReleaseSpinLock(&IopDeviceTreeLock, OldIrql); + + IopCancelPrepareDeviceForRemoval(ChildDeviceNode->PhysicalDeviceObject); + + /* IRP_MN_CANCEL_REMOVE_DEVICE is also sent to the device + * that failed the IRP_MN_QUERY_REMOVE_DEVICE request */ + if (ChildDeviceNode == FailedRemoveDevice) + return Status; + + ChildDeviceNode = NextDeviceNode; + + KeAcquireSpinLock(&IopDeviceTreeLock, &OldIrql); + } + KeReleaseSpinLock(&IopDeviceTreeLock, OldIrql); + + return Status; +} + +static +VOID +IopSendRemoveChildDevices(PDEVICE_NODE ParentDeviceNode) +{ + PDEVICE_NODE ChildDeviceNode, NextDeviceNode; + KIRQL OldIrql; + + KeAcquireSpinLock(&IopDeviceTreeLock, &OldIrql); + ChildDeviceNode = ParentDeviceNode->Child; + while (ChildDeviceNode != NULL) + { + NextDeviceNode = ChildDeviceNode->Sibling; + KeReleaseSpinLock(&IopDeviceTreeLock, OldIrql); + + IopSendRemoveDevice(ChildDeviceNode->PhysicalDeviceObject); + + ChildDeviceNode = NextDeviceNode; + + KeAcquireSpinLock(&IopDeviceTreeLock, &OldIrql); + } + KeReleaseSpinLock(&IopDeviceTreeLock, OldIrql); +} + +static +VOID +IopCancelRemoveChildDevices(PDEVICE_NODE ParentDeviceNode) +{ + PDEVICE_NODE ChildDeviceNode, NextDeviceNode; + KIRQL OldIrql; + + KeAcquireSpinLock(&IopDeviceTreeLock, &OldIrql); + ChildDeviceNode = ParentDeviceNode->Child; + while (ChildDeviceNode != NULL) + { + NextDeviceNode = ChildDeviceNode->Sibling; + KeReleaseSpinLock(&IopDeviceTreeLock, OldIrql); + + IopCancelPrepareDeviceForRemoval(ChildDeviceNode->PhysicalDeviceObject); + + ChildDeviceNode = NextDeviceNode; + + KeAcquireSpinLock(&IopDeviceTreeLock, &OldIrql); + } + KeReleaseSpinLock(&IopDeviceTreeLock, OldIrql); +} + +static +NTSTATUS +IopQueryRemoveDeviceRelations(PDEVICE_RELATIONS DeviceRelations) +{ + /* This function DOES NOT dereference the device objects on SUCCESS + * but it DOES dereference device objects on FAILURE */ + + ULONG i, j; + NTSTATUS Status; + + for (i = 0; i < DeviceRelations->Count; i++) + { + Status = IopPrepareDeviceForRemoval(DeviceRelations->Objects[i]); + if (!NT_SUCCESS(Status)) + { + j = i; + goto cleanup; + } + } + + return STATUS_SUCCESS; + +cleanup: + /* IRP_MN_CANCEL_REMOVE_DEVICE is also sent to the device + * that failed the IRP_MN_QUERY_REMOVE_DEVICE request */ + for (i = 0; i <= j; i++) + { + IopCancelPrepareDeviceForRemoval(DeviceRelations->Objects[i]); + ObDereferenceObject(DeviceRelations->Objects[i]); + DeviceRelations->Objects[i] = NULL; + } + for (; i < DeviceRelations->Count; i++) + { + ObDereferenceObject(DeviceRelations->Objects[i]); + DeviceRelations->Objects[i] = NULL; + } + ExFreePool(DeviceRelations); + + return Status; +} + +static +VOID +IopSendRemoveDeviceRelations(PDEVICE_RELATIONS DeviceRelations) +{ + /* This function DOES dereference the device objects in all cases */ + + ULONG i; + + for (i = 0; i < DeviceRelations->Count; i++) + { + IopSendRemoveDevice(DeviceRelations->Objects[i]); + ObDereferenceObject(DeviceRelations->Objects[i]); + DeviceRelations->Objects[i] = NULL; + } + + ExFreePool(DeviceRelations); +} + +static +VOID +IopCancelRemoveDeviceRelations(PDEVICE_RELATIONS DeviceRelations) +{ + /* This function DOES dereference the device objects in all cases */ + + ULONG i; + + for (i = 0; i < DeviceRelations->Count; i++) + { + IopCancelPrepareDeviceForRemoval(DeviceRelations->Objects[i]); + ObDereferenceObject(DeviceRelations->Objects[i]); + DeviceRelations->Objects[i] = NULL; + } + + ExFreePool(DeviceRelations); +} + +VOID +IopCancelPrepareDeviceForRemoval(PDEVICE_OBJECT DeviceObject) +{ + IO_STACK_LOCATION Stack; + IO_STATUS_BLOCK IoStatusBlock; + PDEVICE_RELATIONS DeviceRelations; + NTSTATUS Status; + + IopCancelRemoveDevice(DeviceObject); + + Stack.Parameters.QueryDeviceRelations.Type = RemovalRelations; + + Status = IopInitiatePnpIrp(DeviceObject, + &IoStatusBlock, + IRP_MN_QUERY_DEVICE_RELATIONS, + &Stack); + if (!NT_SUCCESS(Status)) + { + DPRINT("IopInitiatePnpIrp() failed with status 0x%08lx\n", Status); + DeviceRelations = NULL; + } + else + { + DeviceRelations = (PDEVICE_RELATIONS)IoStatusBlock.Information; + } + + if (DeviceRelations) + IopCancelRemoveDeviceRelations(DeviceRelations); +} + +NTSTATUS IopPrepareDeviceForRemoval(IN PDEVICE_OBJECT DeviceObject) { PDEVICE_NODE DeviceNode = IopGetDeviceNode(DeviceObject); @@ -3890,7 +4142,6 @@ IO_STATUS_BLOCK IoStatusBlock; PDEVICE_RELATIONS DeviceRelations; NTSTATUS Status; - ULONG i; if (DeviceNode->UserFlags & DNUF_NOT_DISABLEABLE) { @@ -3898,15 +4149,9 @@ return STATUS_UNSUCCESSFUL; } - IopQueueTargetDeviceEvent(&GUID_DEVICE_REMOVE_PENDING, - &DeviceNode->InstancePath); - if (IopQueryRemoveDevice(DeviceObject) != STATUS_SUCCESS) { DPRINT1("Removal vetoed by failing the query remove request\n"); - - IopQueueTargetDeviceEvent(&GUID_DEVICE_REMOVAL_VETOED, - &DeviceNode->InstancePath); return STATUS_UNSUCCESSFUL; } @@ -3929,51 +4174,24 @@ if (DeviceRelations) { - for (i = 0; i < DeviceRelations->Count; i++) - { - PDEVICE_NODE RelationsDeviceNode = IopGetDeviceNode(DeviceRelations->Objects[i]); - - IopQueueTargetDeviceEvent(&GUID_DEVICE_REMOVE_PENDING, - &RelationsDeviceNode->InstancePath); - - if (IopRemoveDevice(RelationsDeviceNode) != STATUS_SUCCESS) - { - DPRINT1("Device removal vetoed by failing a dependent query remove request\n"); - - Status = STATUS_UNSUCCESSFUL; - - goto cleanup; - } - else - { - ObDereferenceObject(DeviceRelations->Objects[i]); - - DeviceRelations->Objects[i] = NULL; - } - } - - ExFreePool(DeviceRelations); - - DeviceRelations = NULL; - } - - Status = STATUS_SUCCESS; - -cleanup: + Status = IopQueryRemoveDeviceRelations(DeviceRelations); + if (!NT_SUCCESS(Status)) + return Status; + } + + Status = IopQueryRemoveChildDevices(DeviceNode); + if (!NT_SUCCESS(Status)) + { + if (DeviceRelations) + IopCancelRemoveDeviceRelations(DeviceRelations); + return Status; + } + if (DeviceRelations) - { - for (i = 0; i < DeviceRelations->Count; i++) - { - if (DeviceRelations->Objects[i]) - { - ObDereferenceObject(DeviceRelations->Objects[i]); - } - } - - ExFreePool(DeviceRelations); - } - - return Status; + IopSendRemoveDeviceRelations(DeviceRelations); + IopSendRemoveChildDevices(DeviceNode); + + return STATUS_SUCCESS; } NTSTATUS @@ -3992,9 +4210,6 @@ DeviceNode->Flags |= DNF_WILL_BE_REMOVED; return STATUS_SUCCESS; } - - IopQueueTargetDeviceEvent(&GUID_DEVICE_REMOVAL_VETOED, - &DeviceNode->InstancePath); return Status; } @@ -4012,16 +4227,13 @@ IO_STACK_LOCATION Stack; DEVICE_CAPABILITIES Capabilities; NTSTATUS Status; - ULONG i; IopQueueTargetDeviceEvent(&GUID_DEVICE_KERNEL_INITIATED_EJECT, &DeviceNode->InstancePath); if (IopQueryDeviceCapabilities(DeviceNode, &Capabilities) != STATUS_SUCCESS) { - IopQueueTargetDeviceEvent(&GUID_DEVICE_EJECT_VETOED, - &DeviceNode->InstancePath); - return; + goto cleanup; } Stack.Parameters.QueryDeviceRelations.Type = EjectionRelations; @@ -4042,47 +4254,36 @@ if (DeviceRelations) { - for (i = 0; i < DeviceRelations->Count; i++) - { - PDEVICE_NODE RelationsDeviceNode = IopGetDeviceNode(DeviceRelations->Objects[i]); - - IopQueueTargetDeviceEvent(&GUID_DEVICE_REMOVE_PENDING, - &RelationsDeviceNode->InstancePath); - - if (IopRemoveDevice(RelationsDeviceNode) != STATUS_SUCCESS) - { - DPRINT1("Device removal vetoed by failing a query remove request (ejection relations)\n"); - - goto cleanup; - } - else - { - ObDereferenceObject(DeviceRelations->Objects[i]); - - DeviceRelations->Objects[i] = NULL; - } - } - - ExFreePool(DeviceRelations); - - DeviceRelations = NULL; + Status = IopQueryRemoveDeviceRelations(DeviceRelations); + if (!NT_SUCCESS(Status)) + goto cleanup; + } + + Status = IopQueryRemoveChildDevices(DeviceNode); + if (!NT_SUCCESS(Status)) + { + if (DeviceRelations) + IopCancelRemoveDeviceRelations(DeviceRelations); + goto cleanup; } if (IopPrepareDeviceForRemoval(PhysicalDeviceObject) != STATUS_SUCCESS) { - IopQueueTargetDeviceEvent(&GUID_DEVICE_EJECT_VETOED, - &DeviceNode->InstancePath); - return; - } + if (DeviceRelations) + IopCancelRemoveDeviceRelations(DeviceRelations); + IopCancelRemoveChildDevices(DeviceNode); + goto cleanup; + } + + if (DeviceRelations) + IopSendRemoveDeviceRelations(DeviceRelations); + IopSendRemoveChildDevices(DeviceNode); if (Capabilities.EjectSupported) { if (IopSendEject(PhysicalDeviceObject) != STATUS_SUCCESS) { - IopQueueTargetDeviceEvent(&GUID_DEVICE_EJECT_VETOED, - &DeviceNode->InstancePath); - - return; + goto cleanup; } } else @@ -4090,27 +4291,14 @@ DeviceNode->Flags |= DNF_DISABLED; } + IopQueueTargetDeviceEvent(&GUID_DEVICE_EJECT, + &DeviceNode->InstancePath); + + return; + cleanup: - if (DeviceRelations) - { - for (i = 0; i < DeviceRelations->Count; i++) - { - if (DeviceRelations->Objects[i]) - { - ObDereferenceObject(DeviceRelations->Objects[i]); - } - } - - ExFreePool(DeviceRelations); - - IopQueueTargetDeviceEvent(&GUID_DEVICE_EJECT_VETOED, - &DeviceNode->InstancePath); - } - else - { - IopQueueTargetDeviceEvent(&GUID_DEVICE_EJECT, - &DeviceNode->InstancePath); - } + IopQueueTargetDeviceEvent(&GUID_DEVICE_EJECT_VETOED, + &DeviceNode->InstancePath); } /*
13 years, 6 months
1
0
0
0
[rharabien] 52045: [APITESTS] - Add more Rectangle function tests - Improve ScrollDC tests
by rharabien@svn.reactos.org
Author: rharabien Date: Wed Jun 1 18:20:51 2011 New Revision: 52045 URL:
http://svn.reactos.org/svn/reactos?rev=52045&view=rev
Log: [APITESTS] - Add more Rectangle function tests - Improve ScrollDC tests Modified: trunk/rostests/apitests/gdi32/Rectangle.c trunk/rostests/apitests/user32/ScrollDC.c Modified: trunk/rostests/apitests/gdi32/Rectangle.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/gdi32/Rectangle.…
============================================================================== --- trunk/rostests/apitests/gdi32/Rectangle.c [iso-8859-1] (original) +++ trunk/rostests/apitests/gdi32/Rectangle.c [iso-8859-1] Wed Jun 1 18:20:51 2011 @@ -15,6 +15,7 @@ HBITMAP hBmp; BOOL ret; HBRUSH hBrush; + HPEN hPen; COLORREF color; hdc = CreateCompatibleDC(NULL); @@ -48,7 +49,7 @@ ok( color == RGB(0, 0, 0), "Expected 0, got 0x%08x\n", (UINT)color); ret = BitBlt(hdc, 0, 0, 4, 4, NULL, 0, 0, WHITENESS); - ok(ret, "BitBlt failed to blank the bitmap!\n"); + ok(ret, "BitBlt failed to blank the bitmap!\n"); /* Try well ordered rectangle coordinates */ ret = Rectangle(hdc, 0, 0, 2, 2); ok(ret, "Rectangle failed!"); @@ -62,6 +63,28 @@ ok( color == RGB(255, 255, 255), "Expected 0x00FFFFFF, got 0x%08x\n", (UINT)color); color = GetPixel(hdc, 1, 1); ok( color == RGB(0, 0, 0), "Expected 0, got 0x%08x\n", (UINT)color); + + /* tests with NULL pen */ + hPen = SelectObject(hdc, GetStockObject(NULL_PEN)); + + /* Blank the bitmap */ + ret = BitBlt(hdc, 0, 0, 4, 4, NULL, 0, 0, WHITENESS); + ok(ret, "BitBlt failed to blank the bitmap!\n"); + + ret = Rectangle(hdc, 0, 0, 3, 3); + ok(ret, "Rectangle failed!"); + color = GetPixel(hdc, 0, 0); + ok( color == RGB(0, 0, 0), "Expected 0, got 0x%08x\n", (UINT)color); + color = GetPixel(hdc, 2, 2); + ok( color == RGB(255, 255, 255), "Expected 0x00FFFFFF, got 0x%08x\n", (UINT)color); + color = GetPixel(hdc, 0, 2); + ok( color == RGB(255, 255, 255), "Expected 0x00FFFFFF, got 0x%08x\n", (UINT)color); + color = GetPixel(hdc, 2, 0); + ok( color == RGB(255, 255, 255), "Expected 0x00FFFFFF, got 0x%08x\n", (UINT)color); + color = GetPixel(hdc, 1, 1); + ok( color == RGB(0, 0, 0), "Expected 0, got 0x%08x\n", (UINT)color); + + SelectObject(hdc, hPen); /* Same tests with GM_ADVANCED */ ok(SetGraphicsMode(hdc, GM_ADVANCED) == GM_COMPATIBLE, "Default mode for the DC is not GM_COMPATIBLE.\n"); Modified: trunk/rostests/apitests/user32/ScrollDC.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/user32/ScrollDC.…
============================================================================== --- trunk/rostests/apitests/user32/ScrollDC.c [iso-8859-1] (original) +++ trunk/rostests/apitests/user32/ScrollDC.c [iso-8859-1] Wed Jun 1 18:20:51 2011 @@ -27,30 +27,35 @@ /* Test that no update region is there */ hrgn = CreateRectRgn(0,0,0,0); iResult = GetUpdateRgn(hWnd, hrgn, FALSE); - ok (iResult == NULLREGION, "\n"); + ok (iResult == NULLREGION, "Expected NULLREGION, got %d\n", iResult); /* Test normal scrolling */ - ok(ScrollDC(hDC, 0, 0, NULL, NULL, hrgn, NULL) == TRUE, "\n"); + ok(ScrollDC(hDC, 0, 0, NULL, NULL, hrgn, NULL) == TRUE, "ScrollDC failed\n"); /* Scroll with invalid update region */ DeleteObject(hrgn); - ok(ScrollDC(hDC, 50, 0, NULL, NULL, hrgn, NULL) == FALSE, "\n"); + ok(ScrollDC(hDC, 50, 0, NULL, NULL, (HRGN)0x12345678, NULL) == FALSE, "ScrollDC successed\n"); + ok(ScrollDC(hDC, 50, 0, NULL, NULL, hrgn, NULL) == FALSE, "ScrollDC successed\n"); hrgn = CreateRectRgn(0,0,0,0); - ok(GetUpdateRgn(hWnd, hrgn, FALSE) == NULLREGION, "\n"); + iResult = GetUpdateRgn(hWnd, hrgn, FALSE); + ok(iResult == NULLREGION, "Expected NULLREGION, got %d\n", iResult); /* Scroll with invalid update rect pointer */ - ok(ScrollDC(hDC, 50, 0, NULL, NULL, NULL, (PRECT)1) == 0, "\n"); - ok(GetUpdateRgn(hWnd, hrgn, FALSE) == NULLREGION, "\n"); + ok(ScrollDC(hDC, 50, 0, NULL, NULL, NULL, (PRECT)1) == FALSE, "ScrollDC failed\n"); + iResult = GetUpdateRgn(hWnd, hrgn, FALSE); + ok(iResult == NULLREGION, "Expected NULLREGION, got %d\n", iResult); /* Scroll with a clip rect */ rcClip.left = 50; rcClip.top = 0; rcClip.right = 100; rcClip.bottom = 100; - ok(ScrollDC(hDC, 50, 0, NULL, &rcClip, hrgn, NULL) == TRUE, "\n"); - ok(GetUpdateRgn(hWnd, hrgn, FALSE) == NULLREGION, "\n"); + ok(ScrollDC(hDC, 50, 0, NULL, &rcClip, hrgn, NULL) == TRUE, "ScrollDC failed\n"); + iResult = GetUpdateRgn(hWnd, hrgn, FALSE); + ok(iResult == NULLREGION, "Expected NULLREGION, got %d\n", iResult); /* Scroll with a clip rect */ rcClip.left = 50; rcClip.top = 0; rcClip.right = 100; rcClip.bottom = 100; - ok(ScrollDC(hDC, 50, 50, NULL, &rcClip, hrgn, NULL) == TRUE, "\n"); - ok(GetUpdateRgn(hWnd, hrgn, FALSE) == NULLREGION, "\n"); + ok(ScrollDC(hDC, 50, 50, NULL, &rcClip, hrgn, NULL) == TRUE, "ScrollDC failed\n"); + iResult = GetUpdateRgn(hWnd, hrgn, FALSE); + ok(iResult == NULLREGION, "Expected NULLREGION, got %d\n", iResult); /* Overlap with another window */ hWnd2 = CreateWindowW(L"BUTTON", L"TestWindow", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
13 years, 6 months
1
0
0
0
[rharabien] 52044: [NTOSKRNL] - Bugcheck if ExFreePoolWithTag is called with wrong tag
by rharabien@svn.reactos.org
Author: rharabien Date: Wed Jun 1 18:16:52 2011 New Revision: 52044 URL:
http://svn.reactos.org/svn/reactos?rev=52044&view=rev
Log: [NTOSKRNL] - Bugcheck if ExFreePoolWithTag is called with wrong tag Modified: trunk/reactos/ntoskrnl/mm/ARM3/expool.c Modified: trunk/reactos/ntoskrnl/mm/ARM3/expool.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/expool.c?…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/expool.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/expool.c [iso-8859-1] Wed Jun 1 18:16:52 2011 @@ -736,7 +736,7 @@ // // Use a default tag of "None" // - return ExAllocatePoolWithTag(PoolType, NumberOfBytes, 'enoN'); + return ExAllocatePoolWithTag(PoolType, NumberOfBytes, TAG_NONE); } /* @@ -789,6 +789,15 @@ OldIrql = ExLockPool(PoolDesc); // + // Check block tag + // + if (TagToFree && TagToFree != Entry->PoolTag) + { + DPRINT1("Freeing pool - invalid tag specified: %.4s != %.4s\n", (char*)&TagToFree, (char*)&Entry->PoolTag); + KeBugCheckEx(BAD_POOL_CALLER, 0x0A, (ULONG_PTR)P, Entry->PoolTag, TagToFree); + } + + // // Check if the next allocation is at the end of the page // ExpCheckPoolBlocks(Entry);
13 years, 6 months
1
0
0
0
[rharabien] 52043: [NTOSKRNL] - Use tags when allocation and freeing memory and define them in tag.h - Fix some wrongly used tags when freeing - Our new memory manager doesn't check tags when ExFre...
by rharabien@svn.reactos.org
Author: rharabien Date: Wed Jun 1 13:39:36 2011 New Revision: 52043 URL:
http://svn.reactos.org/svn/reactos?rev=52043&view=rev
Log: [NTOSKRNL] - Use tags when allocation and freeing memory and define them in tag.h - Fix some wrongly used tags when freeing - Our new memory manager doesn't check tags when ExFreePoolWithTag is used. It will be fixed after testing Modified: trunk/reactos/ntoskrnl/cache/section/data.c trunk/reactos/ntoskrnl/ex/atom.c trunk/reactos/ntoskrnl/ex/callback.c trunk/reactos/ntoskrnl/ex/handle.c trunk/reactos/ntoskrnl/ex/harderr.c trunk/reactos/ntoskrnl/ex/init.c trunk/reactos/ntoskrnl/ex/profile.c trunk/reactos/ntoskrnl/ex/resource.c trunk/reactos/ntoskrnl/fstub/disksup.c trunk/reactos/ntoskrnl/fstub/fstubex.c trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h trunk/reactos/ntoskrnl/include/internal/ob_x.h trunk/reactos/ntoskrnl/include/internal/tag.h trunk/reactos/ntoskrnl/io/iomgr/file.c trunk/reactos/ntoskrnl/mm/ARM3/contmem.c trunk/reactos/ntoskrnl/mm/ARM3/mminit.c trunk/reactos/ntoskrnl/mm/ARM3/section.c trunk/reactos/ntoskrnl/mm/ARM3/sysldr.c trunk/reactos/ntoskrnl/mm/marea.c trunk/reactos/ntoskrnl/ob/obname.c trunk/reactos/ntoskrnl/ob/obsdcach.c trunk/reactos/ntoskrnl/se/acl.c trunk/reactos/ntoskrnl/se/sd.c trunk/reactos/ntoskrnl/se/sid.c trunk/reactos/ntoskrnl/se/token.c Modified: trunk/reactos/ntoskrnl/cache/section/data.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cache/section/dat…
============================================================================== --- trunk/reactos/ntoskrnl/cache/section/data.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/cache/section/data.c [iso-8859-1] Wed Jun 1 13:39:36 2011 @@ -307,7 +307,7 @@ MmUnlockCacheSectionSegment(Segment); } DPRINTC("Segment %x destroy\n", Segment); - ExFreePool(Segment); + ExFreePoolWithTag(Segment, TAG_MM_SECTION_SEGMENT); } NTSTATUS Modified: trunk/reactos/ntoskrnl/ex/atom.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/atom.c?rev=520…
============================================================================== --- trunk/reactos/ntoskrnl/ex/atom.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/atom.c [iso-8859-1] Wed Jun 1 13:39:36 2011 @@ -172,7 +172,8 @@ } /* If we captured anything, free it */ - if ((CapturedName) && (CapturedName != AtomName)) ExFreePool(CapturedName); + if ((CapturedName) && (CapturedName != AtomName)) + ExFreePoolWithTag(CapturedName, TAG_ATOM); /* Return to caller */ return Status; @@ -321,7 +322,8 @@ } /* If we captured anything, free it */ - if ((CapturedName) && (CapturedName != AtomName)) ExFreePool(CapturedName); + if ((CapturedName) && (CapturedName != AtomName)) + ExFreePoolWithTag(CapturedName, TAG_ATOM); /* Return to caller */ return Status; Modified: trunk/reactos/ntoskrnl/ex/callback.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/callback.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ex/callback.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/callback.c [iso-8859-1] Wed Jun 1 13:39:36 2011 @@ -77,7 +77,7 @@ ExFreeCallBack(IN PEX_CALLBACK_ROUTINE_BLOCK CallbackBlock) { /* Just free it from memory */ - ExFreePool(CallbackBlock); + ExFreePoolWithTag(CallbackBlock, CALLBACK_TAG); } VOID @@ -602,7 +602,7 @@ KeReleaseSpinLock(&CallbackObject->Lock, OldIrql); /* Free the registration */ - ExFreePool(CallbackRegistration); + ExFreePoolWithTag(CallbackRegistration, CALLBACK_TAG); CallbackRegistration = NULL; /* Dereference the object */ @@ -676,7 +676,7 @@ KeReleaseSpinLock(&CallbackObject->Lock, OldIrql); /* Delete this registration */ - ExFreePool(CallbackRegistration); + ExFreePoolWithTag(CallbackRegistration, CALLBACK_TAG); /* Remove the reference */ ObDereferenceObject(CallbackObject); Modified: trunk/reactos/ntoskrnl/ex/handle.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/handle.c?rev=5…
============================================================================== --- trunk/reactos/ntoskrnl/ex/handle.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/handle.c [iso-8859-1] Wed Jun 1 13:39:36 2011 @@ -132,7 +132,7 @@ PVOID Buffer; /* Do the allocation */ - Buffer = ExAllocatePoolWithTag(PagedPool, Size, 'btbO'); + Buffer = ExAllocatePoolWithTag(PagedPool, Size, TAG_OBJECT_TABLE); if (Buffer) { /* Clear the memory */ @@ -157,7 +157,7 @@ PVOID Buffer; /* Do the allocation */ - Buffer = ExAllocatePoolWithTag(PagedPool, Size, 'btbO'); + Buffer = ExAllocatePoolWithTag(PagedPool, Size, TAG_OBJECT_TABLE); if (Buffer) { /* Check if we have a process to charge quota */ @@ -178,7 +178,7 @@ IN SIZE_T Size) { /* Free the buffer */ - ExFreePool(Buffer); + ExFreePoolWithTag(Buffer, TAG_OBJECT_TABLE); if (Process) { /* FIXME: Release quota */ @@ -273,7 +273,7 @@ } /* Free the actual table and check if we need to release quota */ - ExFreePool(HandleTable); + ExFreePoolWithTag(HandleTable, TAG_OBJECT_TABLE); if (Process) { /* FIXME: TODO */ @@ -345,7 +345,7 @@ /* Allocate the table */ HandleTable = ExAllocatePoolWithTag(PagedPool, sizeof(HANDLE_TABLE), - 'btbO'); + TAG_OBJECT_TABLE); if (!HandleTable) return NULL; /* Check if we have a process */ @@ -362,7 +362,7 @@ if (!HandleTableTable) { /* Failed, free the table */ - ExFreePool(HandleTable); + ExFreePoolWithTag(HandleTable, TAG_OBJECT_TABLE); return NULL; } Modified: trunk/reactos/ntoskrnl/ex/harderr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/harderr.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/ex/harderr.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/harderr.c [iso-8859-1] Wed Jun 1 13:39:36 2011 @@ -640,7 +640,7 @@ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { /* Free captured buffer */ - if (SafeParams) ExFreePool(SafeParams); + if (SafeParams) ExFreePoolWithTag(SafeParams, TAG_ERR); /* Return the exception code */ _SEH2_YIELD(return _SEH2_GetExceptionCode()); @@ -676,7 +676,7 @@ if (PreviousMode != KernelMode) { /* That means we have a buffer to free */ - if (SafeParams) ExFreePool(SafeParams); + if (SafeParams) ExFreePoolWithTag(SafeParams, TAG_ERR); /* Enter SEH Block for return */ _SEH2_TRY Modified: trunk/reactos/ntoskrnl/ex/init.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/init.c?rev=520…
============================================================================== --- trunk/reactos/ntoskrnl/ex/init.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/init.c [iso-8859-1] Wed Jun 1 13:39:36 2011 @@ -244,7 +244,7 @@ /* Allocate the a new buffer since loader memory will be freed */ ExpNlsTableBase = ExAllocatePoolWithTag(NonPagedPool, ExpNlsTableSize, - 'iltR'); + TAG_RTLI); if (!ExpNlsTableBase) KeBugCheck(PHASE0_INITIALIZATION_FAILED); /* Copy the codepage data in its new location. */ @@ -334,7 +334,7 @@ RtlCopyMemory(SectionBase, ExpNlsTableBase, ExpNlsTableSize); /* Free the previously allocated buffer and set the new location */ - ExFreePoolWithTag(ExpNlsTableBase, 'iltR'); + ExFreePoolWithTag(ExpNlsTableBase, TAG_RTLI); ExpNlsTableBase = SectionBase; /* Initialize the NLS Tables */ @@ -1321,7 +1321,7 @@ /* Allocate the initialization buffer */ InitBuffer = ExAllocatePoolWithTag(NonPagedPool, sizeof(INIT_BUFFER), - 'tinI'); + TAG_INIT); if (!InitBuffer) { /* Bugcheck */ @@ -1961,7 +1961,7 @@ ExpInitializationPhase++; /* Free the boot buffer */ - ExFreePool(InitBuffer); + ExFreePoolWithTag(InitBuffer, TAG_INIT); DPRINT1("Free non-cache pages: %lx\n", MmAvailablePages + MiMemoryConsumers[MC_CACHE].PagesUsed); } Modified: trunk/reactos/ntoskrnl/ex/profile.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/profile.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/ex/profile.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/profile.c [iso-8859-1] Wed Jun 1 13:39:36 2011 @@ -54,7 +54,7 @@ /* Unmap the Locked Buffer */ MmUnmapLockedPages(Profile->LockedBufferAddress, Profile->Mdl); MmUnlockPages(Profile->Mdl); - ExFreePool(Profile->Mdl); + IoFreeMdl(Profile->Mdl); } /* Check if a Process is associated and reference it */ @@ -368,7 +368,7 @@ } /* Allocate the Mdl Structure */ - Profile->Mdl = MmCreateMdl(NULL, Profile->Buffer, Profile->BufferSize); + Profile->Mdl = IoAllocateMdl(Profile->Buffer, Profile->BufferSize, FALSE, FALSE, NULL); /* Protect this in SEH as we might raise an exception */ _SEH2_TRY @@ -381,7 +381,7 @@ /* Release our lock, free the buffer, dereference and return */ KeReleaseMutex(&ExpProfileMutex, FALSE); ObDereferenceObject(Profile); - ExFreePool(ProfileObject); + ExFreePoolWithTag(ProfileObject, TAG_PROFILE); _SEH2_YIELD(return _SEH2_GetExceptionCode()); } _SEH2_END; @@ -449,7 +449,7 @@ /* Unlock the Buffer */ MmUnmapLockedPages(Profile->LockedBufferAddress, Profile->Mdl); MmUnlockPages(Profile->Mdl); - ExFreePool(Profile->ProfileObject); + ExFreePoolWithTag(Profile->ProfileObject, TAG_PROFILE); /* Clear the Locked Buffer pointer, meaning the Object is Stopped */ Profile->LockedBufferAddress = NULL; Modified: trunk/reactos/ntoskrnl/ex/resource.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/resource.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ex/resource.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/resource.c [iso-8859-1] Wed Jun 1 13:39:36 2011 @@ -220,7 +220,7 @@ { /* Someone already set it, free our event */ DPRINT1("WARNING: Handling race condition\n"); - ExFreePool(Event); + ExFreePoolWithTag(Event, TAG_RESOURCE_EVENT); } break; @@ -280,7 +280,7 @@ { /* Someone already set it, free our semaphore */ DPRINT1("WARNING: Handling race condition\n"); - ExFreePool(Semaphore); + ExFreePoolWithTag(Semaphore, TAG_RESOURCE_SEMAPHORE); } break; @@ -356,7 +356,7 @@ { /* Resource changed while we weren't holding the lock; bail out */ ExReleaseResourceLock(Resource, LockHandle); - ExFreePool(Table); + ExFreePoolWithTag(Table, TAG_RESOURCE_TABLE); } else { @@ -380,7 +380,7 @@ ExReleaseResourceLock(Resource, LockHandle); /* Free the old table */ - if (Owner) ExFreePool(Owner); + if (Owner) ExFreePoolWithTag(Owner, TAG_RESOURCE_TABLE); /* Set the resource index */ if (!OldSize) OldSize = 1; @@ -1473,9 +1473,9 @@ KeReleaseInStackQueuedSpinLock(&LockHandle); /* Free every structure */ - if (Resource->OwnerTable) ExFreePool(Resource->OwnerTable); - if (Resource->SharedWaiters) ExFreePool(Resource->SharedWaiters); - if (Resource->ExclusiveWaiters) ExFreePool(Resource->ExclusiveWaiters); + if (Resource->OwnerTable) ExFreePoolWithTag(Resource->OwnerTable, TAG_RESOURCE_TABLE); + if (Resource->SharedWaiters) ExFreePoolWithTag(Resource->SharedWaiters, TAG_RESOURCE_SEMAPHORE); + if (Resource->ExclusiveWaiters) ExFreePoolWithTag(Resource->ExclusiveWaiters, TAG_RESOURCE_EVENT); /* Return success */ return STATUS_SUCCESS; Modified: trunk/reactos/ntoskrnl/fstub/disksup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fstub/disksup.c?r…
============================================================================== --- trunk/reactos/ntoskrnl/fstub/disksup.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/fstub/disksup.c [iso-8859-1] Wed Jun 1 13:39:36 2011 @@ -159,7 +159,7 @@ BOOLEAN First = TRUE; ULONG Count; - DirectoryInfo = ExAllocatePool(PagedPool, 2 * PAGE_SIZE); + DirectoryInfo = ExAllocatePoolWithTag(PagedPool, 2 * PAGE_SIZE, TAG_FILE_SYSTEM); if (DirectoryInfo == NULL) { return 0; @@ -178,7 +178,7 @@ if (!NT_SUCCESS(Status)) { DPRINT1("ZwOpenDirectoryObject for %wZ failed, status=%lx\n", &ArcName, Status); - ExFreePool(DirectoryInfo); + ExFreePoolWithTag(DirectoryInfo, TAG_FILE_SYSTEM); return 0; } @@ -223,7 +223,7 @@ } } } - ExFreePool(DirectoryInfo); + ExFreePoolWithTag(DirectoryInfo, TAG_FILE_SYSTEM); return RDiskCount; } @@ -377,8 +377,8 @@ PDRIVE_LAYOUT_INFORMATION Buffer; /* Allocate a partition list for a single entry. */ - Buffer = ExAllocatePool(NonPagedPool, - sizeof(DRIVE_LAYOUT_INFORMATION)); + Buffer = ExAllocatePoolWithTag(NonPagedPool, + sizeof(DRIVE_LAYOUT_INFORMATION), TAG_FILE_SYSTEM); if (Buffer != NULL) { RtlZeroMemory(Buffer, @@ -446,13 +446,13 @@ DPRINT("RDiskCount %d\n", RDiskCount); - Buffer1 = (PWSTR)ExAllocatePool(PagedPool, - 64 * sizeof(WCHAR)); - Buffer2 = (PWSTR)ExAllocatePool(PagedPool, - 32 * sizeof(WCHAR)); - - PartialInformation = (PKEY_VALUE_PARTIAL_INFORMATION)ExAllocatePool(PagedPool, - sizeof(KEY_VALUE_PARTIAL_INFORMATION) + sizeof(REG_DISK_MOUNT_INFO)); + Buffer1 = (PWSTR)ExAllocatePoolWithTag(PagedPool, + 64 * sizeof(WCHAR), TAG_FILE_SYSTEM); + Buffer2 = (PWSTR)ExAllocatePoolWithTag(PagedPool, + 32 * sizeof(WCHAR), TAG_FILE_SYSTEM); + + PartialInformation = (PKEY_VALUE_PARTIAL_INFORMATION)ExAllocatePoolWithTag(PagedPool, + sizeof(KEY_VALUE_PARTIAL_INFORMATION) + sizeof(REG_DISK_MOUNT_INFO), TAG_FILE_SYSTEM); if (!Buffer1 || !Buffer2 || !PartialInformation) return; @@ -528,13 +528,13 @@ /* Initialize layout array */ if (ConfigInfo->DiskCount == 0) goto end_assign_disks; - LayoutArray = ExAllocatePool(NonPagedPool, - ConfigInfo->DiskCount * sizeof(PDRIVE_LAYOUT_INFORMATION)); + LayoutArray = ExAllocatePoolWithTag(NonPagedPool, + ConfigInfo->DiskCount * sizeof(PDRIVE_LAYOUT_INFORMATION), TAG_FILE_SYSTEM); if (!LayoutArray) { - ExFreePool(PartialInformation); - ExFreePool(Buffer2); - ExFreePool(Buffer1); + ExFreePoolWithTag(PartialInformation, TAG_FILE_SYSTEM); + ExFreePoolWithTag(Buffer2, TAG_FILE_SYSTEM); + ExFreePoolWithTag(Buffer1, TAG_FILE_SYSTEM); if (hKey) ZwClose(hKey); } @@ -896,9 +896,9 @@ for (i = 0; i < ConfigInfo->DiskCount; i++) { if (LayoutArray[i] != NULL) - ExFreePool(LayoutArray[i]); - } - ExFreePool(LayoutArray); + ExFreePoolWithTag(LayoutArray[i], TAG_FILE_SYSTEM); + } + ExFreePoolWithTag(LayoutArray, TAG_FILE_SYSTEM); end_assign_disks: /* Assign floppy drives */ @@ -948,9 +948,9 @@ /* Anything else to do? */ - ExFreePool(PartialInformation); - ExFreePool(Buffer2); - ExFreePool(Buffer1); + ExFreePoolWithTag(PartialInformation, TAG_FILE_SYSTEM); + ExFreePoolWithTag(Buffer2, TAG_FILE_SYSTEM); + ExFreePoolWithTag(Buffer1, TAG_FILE_SYSTEM); if (hKey) { ZwClose(hKey); @@ -1249,8 +1249,8 @@ Cleanup: /* Free all the pointers */ if (Event) ExFreePoolWithTag(Event, TAG_FILE_SYSTEM); - if (IoStatusBlock) ExFreePool(IoStatusBlock); - if (DiskGeometry) ExFreePool(DiskGeometry); + if (IoStatusBlock) ExFreePoolWithTag(IoStatusBlock, TAG_FILE_SYSTEM); + if (DiskGeometry) ExFreePoolWithTag(DiskGeometry, TAG_FILE_SYSTEM); return; } @@ -1425,7 +1425,7 @@ { /* EZ Drive found, bias the offset */ IsEzDrive = TRUE; - ExFreePool(MbrBuffer); + ExFreePoolWithTag(MbrBuffer, TAG_FILE_SYSTEM); Offset.QuadPart = 512; } @@ -1843,7 +1843,7 @@ { /* EZ Drive found, bias the offset */ IsEzDrive = TRUE; - ExFreePool(MbrBuffer); + ExFreePoolWithTag(MbrBuffer, TAG_FILE_SYSTEM); Offset.QuadPart = 512; } @@ -1995,7 +1995,7 @@ } while (i < PartitionNumber); /* Everything done, cleanup */ - if (Buffer) ExFreePool(Buffer); + if (Buffer) ExFreePoolWithTag(Buffer, TAG_FILE_SYSTEM); return Status; } @@ -2043,7 +2043,7 @@ { /* EZ Drive found, bias the offset */ IsEzDrive = TRUE; - ExFreePool(MbrBuffer); + ExFreePoolWithTag(MbrBuffer, TAG_FILE_SYSTEM); Offset.QuadPart = 512; } Modified: trunk/reactos/ntoskrnl/fstub/fstubex.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fstub/fstubex.c?r…
============================================================================== --- trunk/reactos/ntoskrnl/fstub/fstubex.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/fstub/fstubex.c [iso-8859-1] Wed Jun 1 13:39:36 2011 @@ -893,7 +893,7 @@ /* Allocate a buffer to read a sector on the disk */ Sector = ExAllocatePoolWithTag(NonPagedPool, Disk->SectorSize, - 'BtsF'); + TAG_FSTUB); if (!Sector) { DPRINT("EFI::Lacking resources!\n"); @@ -911,7 +911,7 @@ (PUSHORT)Sector); if (!NT_SUCCESS(Status)) { - ExFreePoolWithTag(Sector, 'BtsF'); + ExFreePoolWithTag(Sector, TAG_FSTUB); DPRINT("EFI::Failed reading sector for partition entry!\n"); return Status; } @@ -931,7 +931,7 @@ (PUSHORT)Sector); if (!NT_SUCCESS(Status)) { - ExFreePoolWithTag(Sector, 'BtsF'); + ExFreePoolWithTag(Sector, TAG_FSTUB); DPRINT("EFI::Failed reading sector for partition entry!\n"); return Status; } @@ -944,7 +944,7 @@ } /* Finally, release memory */ - ExFreePoolWithTag(Sector, 'BtsF'); + ExFreePoolWithTag(Sector, TAG_FSTUB); /* Compare checksums */ if (PreviousCRC32 == EFIHeader->PartitionEntryCRC32) Modified: trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/ntoskrnl.h [iso-8859-1] Wed Jun 1 13:39:36 2011 @@ -59,6 +59,7 @@ #define KeReleaseGuardedMutexUnsafe _KeReleaseGuardedMutexUnsafe #define KeTryToAcquireGuardedMutex _KeTryToAcquireGuardedMutex +#include "tag.h" #include "ke.h" #include "ob.h" #include "mm.h" @@ -83,7 +84,6 @@ #endif #include "dbgk.h" #include "spinlock.h" -#include "tag.h" #include "test.h" #include "inbv.h" #include "vdm.h" Modified: trunk/reactos/ntoskrnl/include/internal/ob_x.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/ob_x.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/ob_x.h [iso-8859-1] Wed Jun 1 13:39:36 2011 @@ -136,7 +136,7 @@ if (HeaderNameInfo->Name.Buffer) { /* We can get rid of the object name now */ - ExFreePool(HeaderNameInfo->Name.Buffer); + ExFreePoolWithTag(HeaderNameInfo->Name.Buffer, OB_NAME_TAG); RtlInitEmptyUnicodeString(&HeaderNameInfo->Name, NULL, 0); } Modified: trunk/reactos/ntoskrnl/include/internal/tag.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/tag.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/tag.h [iso-8859-1] Wed Jun 1 13:39:36 2011 @@ -8,10 +8,20 @@ /* formely located in include/callback.h */ #define CALLBACK_TAG 'KBLC' +/* formely located in dbg/dbgkobj.c */ +#define TAG_DEBUG_EVENT 'EgbD' + /* formerly located in ex/resource.c */ #define TAG_RESOURCE_TABLE 'aTeR' #define TAG_RESOURCE_EVENT 'aTeR' #define TAG_RESOURCE_SEMAPHORE 'aTeR' + +/* formerly located in ex/handle.c */ +#define TAG_OBJECT_TABLE 'btbO' + +/* formerly located in ex/init.c */ +#define TAG_INIT 'tinI' +#define TAG_RTLI 'iltR' /* formerly located in fs/notify.c */ #define FSRTL_NOTIFY_TAG 'ITON' @@ -92,6 +102,7 @@ #define TAG_DRIVER_MEM 'MVRD' /* drvm */ #define TAG_MODULE_OBJECT 'omlk' /* klmo - kernel ldr module object */ #define TAG_LDR_WSTR 'swlk' /* klws - kernel ldr wide string */ +#define TAG_LDR_IMPORTS 'klim' /* klim - kernel ldr imports */ /* formerly located in lpc/connect */ #define TAG_LPC_CONNECT_MESSAGE 'CCPL' @@ -101,6 +112,7 @@ /* formerly located in mm/marea.c */ #define TAG_MAREA 'ERAM' +#define TAG_MVAD 'VADM' /* formerly located in mm/pageop.c */ #define TAG_MM_PAGEOP 'POPM' @@ -114,6 +126,9 @@ /* formerly located in mm/rmap.c */ #define TAG_RMAP 'PAMR' +/* formerly located in mm/ARM3/section.c */ +#define TAG_MM ' mM' + /* formerly located in mm/section.c */ #define TAG_MM_SECTION_SEGMENT 'SSMM' #define TAG_SECTION_PAGE_TABLE 'TPSM' @@ -122,6 +137,9 @@ #define TAG_OBJECT_TYPE 'TjbO' #define TAG_SYMLINK_TTARGET 'TTYS' #define TAG_SYMLINK_TARGET 'TMYS' + +/* formerly located in ob/obsdcach.c */ +#define TAG_OB_SD_CACHE 'cSbO' /* Object Manager Tags */ #define OB_NAME_TAG 'mNbO' @@ -153,6 +171,11 @@ /* formerly located in se/sd.c */ #define TAG_SD 'dSeS' +/* formerly located in se/token.c */ +#define TAG_TOKEN_USERS 'uKOT' +#define TAG_TOKEN_PRIVILAGES 'pKOT' +#define TAG_TOKEN_ACL 'kDOT' + /* LPC Tags */ #define TAG_LPC_MESSAGE 'McpL' #define TAG_LPC_ZONE 'ZcpL' Modified: trunk/reactos/ntoskrnl/io/iomgr/file.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/file.c?r…
============================================================================== --- trunk/reactos/ntoskrnl/io/iomgr/file.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/io/iomgr/file.c [iso-8859-1] Wed Jun 1 13:39:36 2011 @@ -762,7 +762,7 @@ if (FileObject->FileName.Length) { /* Free it */ - ExFreePool(FileObject->FileName.Buffer); + ExFreePoolWithTag(FileObject->FileName.Buffer, TAG_IO_NAME); FileObject->FileName.Length = 0; } @@ -868,7 +868,7 @@ } /* Free our buffer */ - ExFreePool(FileBasicInfo); + ExFreePoolWithTag(FileBasicInfo, TAG_IO); } else { @@ -1331,7 +1331,7 @@ if (!NT_SUCCESS(Status) && (Status != STATUS_INFO_LENGTH_MISMATCH)) { /* Free the buffer and fail */ - ExFreePool(LocalInfo); + ExFreePoolWithTag(LocalInfo, TAG_IO); return Status; } @@ -1375,7 +1375,7 @@ if (NT_ERROR(Status)) { /* Fail on errors only, allow warnings */ - ExFreePool(LocalInfo); + ExFreePoolWithTag(LocalInfo, TAG_IO); return Status; } @@ -1386,7 +1386,7 @@ *ReturnLength += LocalFileInfo->FileNameLength; /* Free the allocated buffer and return failure */ - ExFreePool(LocalInfo); + ExFreePoolWithTag(LocalInfo, TAG_IO); return STATUS_BUFFER_OVERFLOW; } @@ -1414,7 +1414,7 @@ sizeof(UNICODE_NULL); /* Free buffer and return */ - ExFreePool(LocalInfo); + ExFreePoolWithTag(LocalInfo, TAG_IO); return Status; } @@ -1908,7 +1908,7 @@ if (OpenPacket.FileObject->FileName.Length) { /* It had a name, free it */ - ExFreePool(OpenPacket.FileObject->FileName.Buffer); + ExFreePoolWithTag(OpenPacket.FileObject->FileName.Buffer, TAG_IO_NAME); } /* Clear the device object to invalidate the FO, and dereference */ Modified: trunk/reactos/ntoskrnl/mm/ARM3/contmem.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/contmem.c…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/contmem.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/contmem.c [iso-8859-1] Wed Jun 1 13:39:36 2011 @@ -430,7 +430,7 @@ // // No such luck // - ExFreePool(BaseAddress); + ExFreePoolWithTag(BaseAddress, 'mCmM'); } } @@ -472,7 +472,7 @@ // // It did, so just use the pool to free this // - ExFreePool(BaseAddress); + ExFreePoolWithTag(BaseAddress, 'mCmM'); return; } Modified: trunk/reactos/ntoskrnl/mm/ARM3/mminit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/mminit.c?…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/mminit.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/mminit.c [iso-8859-1] Wed Jun 1 13:39:36 2011 @@ -1087,7 +1087,7 @@ FALSE); CleanUp: /* Free the DACL */ - ExFreePool(Dacl); + ExFreePoolWithTag(Dacl, 'lcaD'); /* Check if this is the success path */ if (NT_SUCCESS(Status)) @@ -1533,7 +1533,7 @@ RtlCopyMemory(NewBuffer->Run, Buffer->Run, sizeof(PHYSICAL_MEMORY_RUN) * Run); - ExFreePool(Buffer); + ExFreePoolWithTag(Buffer, 'lMmM'); // // Now use the new buffer Modified: trunk/reactos/ntoskrnl/mm/ARM3/section.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/section.c…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/section.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/section.c [iso-8859-1] Wed Jun 1 13:39:36 2011 @@ -177,7 +177,7 @@ BitmapSize = sizeof(RTL_BITMAP) + ((((MmSystemViewSize / MI_SYSTEM_VIEW_BUCKET_SIZE) + 31) / 32) * sizeof(ULONG)); Session->SystemSpaceBitMap = ExAllocatePoolWithTag(NonPagedPool, BitmapSize, - ' mM'); + TAG_MM); ASSERT(Session->SystemSpaceBitMap); RtlInitializeBitMap(Session->SystemSpaceBitMap, (PULONG)(Session->SystemSpaceBitMap + 1), @@ -198,7 +198,7 @@ /* Allocate and zero the view table */ Session->SystemSpaceViewTable = ExAllocatePoolWithTag(NonPagedPool, AllocSize, - ' mM'); + TAG_MM); ASSERT(Session->SystemSpaceViewTable != NULL); RtlZeroMemory(Session->SystemSpaceViewTable, AllocSize); @@ -948,7 +948,7 @@ ULONG ReturnLength; /* Allocate memory for our structure */ - ObjectNameInfo = ExAllocatePoolWithTag(PagedPool, 1024, ' mM'); + ObjectNameInfo = ExAllocatePoolWithTag(PagedPool, 1024, TAG_MM); if (!ObjectNameInfo) return STATUS_NO_MEMORY; /* Query the name */ @@ -960,7 +960,7 @@ { /* Failed, free memory */ DPRINT1("Name query failed\n"); - ExFreePoolWithTag(ObjectNameInfo, ' mM'); + ExFreePoolWithTag(ObjectNameInfo, TAG_MM); *ModuleName = NULL; return Status; } @@ -1088,7 +1088,7 @@ ModuleNameInformation->Name.Buffer); /* Free temp taged buffer from MmGetFileNameForFileObject() */ - ExFreePoolWithTag(ModuleNameInformation, ' mM'); + ExFreePoolWithTag(ModuleNameInformation, TAG_MM); DPRINT("Found ModuleName %S by address %p\n", ModuleName->Buffer, Address); } Modified: trunk/reactos/ntoskrnl/mm/ARM3/sysldr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/sysldr.c?…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/sysldr.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/sysldr.c [iso-8859-1] Wed Jun 1 13:39:36 2011 @@ -336,7 +336,7 @@ Status = DllInit(&RegPath); /* Clean up */ - ExFreePool(RegPath.Buffer); + ExFreePoolWithTag(RegPath.Buffer, TAG_LDR_WSTR); /* Return status value which DllInitialize returned */ return Status; @@ -427,7 +427,7 @@ !((ULONG_PTR)LdrEntry->LoadedImports & MM_SYSLDR_SINGLE_ENTRY)) { /* Free them */ - ExFreePool(CurrentImports); + ExFreePoolWithTag(CurrentImports, TAG_LDR_IMPORTS); } } else @@ -458,7 +458,7 @@ } /* Otherwise, free the import list */ - ExFreePool(LdrEntry->LoadedImports); + ExFreePoolWithTag(LdrEntry->LoadedImports, TAG_LDR_IMPORTS); LdrEntry->LoadedImports = MM_SYSLDR_BOOT_LOADED; } @@ -948,7 +948,7 @@ if (LdrEntry->FullDllName.Buffer) { /* Free it */ - ExFreePool(LdrEntry->FullDllName.Buffer); + ExFreePoolWithTag(LdrEntry->FullDllName.Buffer, TAG_LDR_WSTR); } /* Check if we had a section */ @@ -959,7 +959,7 @@ } /* Free the entry */ - ExFreePool(LdrEntry); + ExFreePoolWithTag(LdrEntry, TAG_MODULE_OBJECT); } /* Release the system lock and return */ @@ -1022,7 +1022,7 @@ LoadedImportsSize = ImportCount * sizeof(PVOID) + sizeof(SIZE_T); LoadedImports = ExAllocatePoolWithTag(PagedPool, LoadedImportsSize, - 'TDmM'); + TAG_LDR_IMPORTS); if (LoadedImports) { /* Zero it */ @@ -1059,7 +1059,7 @@ { /* It's not, it's importing stuff it shouldn't be! */ MiDereferenceImports(LoadedImports); - if (LoadedImports) ExFreePoolWithTag(LoadedImports, 'TDmM'); + if (LoadedImports) ExFreePoolWithTag(LoadedImports, TAG_LDR_IMPORTS); return STATUS_PROCEDURE_NOT_FOUND; } @@ -1073,7 +1073,7 @@ { /* This is not kernel code */ MiDereferenceImports(LoadedImports); - if (LoadedImports) ExFreePoolWithTag(LoadedImports, 'TDmM'); + if (LoadedImports) ExFreePoolWithTag(LoadedImports, TAG_LDR_IMPORTS); return STATUS_PROCEDURE_NOT_FOUND; } @@ -1098,7 +1098,7 @@ { /* Failed */ MiDereferenceImports(LoadedImports); - if (LoadedImports) ExFreePoolWithTag(LoadedImports, 'TDmM'); + if (LoadedImports) ExFreePoolWithTag(LoadedImports, TAG_LDR_IMPORTS); return Status; } @@ -1153,7 +1153,7 @@ sizeof(UNICODE_NULL); DllName.Buffer = ExAllocatePoolWithTag(NonPagedPool, DllName.MaximumLength, - 'TDmM'); + TAG_LDR_WSTR); if (DllName.Buffer) { /* Setup the base length and copy it */ @@ -1177,7 +1177,7 @@ if (NT_SUCCESS(Status)) { /* We can free the DLL Name */ - ExFreePool(DllName.Buffer); + ExFreePoolWithTag(DllName.Buffer, TAG_LDR_WSTR); } else { @@ -1219,7 +1219,7 @@ /* Cleanup and return */ RtlFreeUnicodeString(&NameString); MiDereferenceImports(LoadedImports); - if (LoadedImports) ExFreePoolWithTag(LoadedImports, 'TDmM'); + if (LoadedImports) ExFreePoolWithTag(LoadedImports, TAG_LDR_IMPORTS); return Status; } @@ -1252,7 +1252,7 @@ { /* Cleanup and return */ MiDereferenceImports(LoadedImports); - if (LoadedImports) ExFreePoolWithTag(LoadedImports, 'TDmM'); + if (LoadedImports) ExFreePoolWithTag(LoadedImports, TAG_LDR_IMPORTS); DPRINT1("Warning: Driver failed to load, %S not found\n", *MissingDriver); return STATUS_DRIVER_ENTRYPOINT_NOT_FOUND; } @@ -1282,7 +1282,7 @@ { /* Cleanup and return */ MiDereferenceImports(LoadedImports); - if (LoadedImports) ExFreePoolWithTag(LoadedImports, 'TDmM'); + if (LoadedImports) ExFreePoolWithTag(LoadedImports, TAG_LDR_IMPORTS); return Status; } @@ -1315,13 +1315,13 @@ if (!ImportCount) { /* Free the list and set it to no imports */ - ExFreePoolWithTag(LoadedImports, 'TDmM'); + ExFreePoolWithTag(LoadedImports, TAG_LDR_IMPORTS); LoadedImports = MM_SYSLDR_NO_IMPORTS; } else if (ImportCount == 1) { /* Just one entry, we can free the table and only use our entry */ - ExFreePoolWithTag(LoadedImports, 'TDmM'); + ExFreePoolWithTag(LoadedImports, TAG_LDR_IMPORTS); LoadedImports = (PLOAD_IMPORTS)ImportEntry; } else if (ImportCount != LoadedImports->Count) @@ -1330,7 +1330,7 @@ LoadedImportsSize = ImportCount * sizeof(PVOID) + sizeof(SIZE_T); NewImports = ExAllocatePoolWithTag(PagedPool, LoadedImportsSize, - 'TDmM'); + TAG_LDR_IMPORTS); if (NewImports) { /* Set count */ @@ -1349,7 +1349,7 @@ } /* Free the old copy */ - ExFreePoolWithTag(LoadedImports, 'TDmM'); + ExFreePoolWithTag(LoadedImports, TAG_LDR_IMPORTS); LoadedImports = NewImports; } } @@ -1625,7 +1625,7 @@ if (!(HalEntry) || (!KernelEntry)) return STATUS_NOT_FOUND; /* Allocate the list */ - EntryArray = ExAllocatePoolWithTag(PagedPool, Modules * sizeof(PVOID), 'TDmM'); + EntryArray = ExAllocatePoolWithTag(PagedPool, Modules * sizeof(PVOID), TAG_LDR_IMPORTS); if (!EntryArray) return STATUS_INSUFFICIENT_RESOURCES; /* Loop the loaded module list again */ @@ -1773,7 +1773,7 @@ LoadedImportsSize = ImportSize * sizeof(PVOID) + sizeof(SIZE_T); LoadedImports = ExAllocatePoolWithTag(PagedPool, LoadedImportsSize, - 'TDmM'); + TAG_LDR_IMPORTS); ASSERT(LoadedImports); /* Save the count */ @@ -1805,7 +1805,7 @@ } /* Free the initial array */ - ExFreePool(EntryArray); + ExFreePoolWithTag(EntryArray, TAG_LDR_IMPORTS); /* FIXME: Might not need to keep the HAL/Kernel imports around */ @@ -1923,7 +1923,7 @@ EntrySize = sizeof(LDR_DATA_TABLE_ENTRY) + LdrEntry->BaseDllName.MaximumLength + sizeof(UNICODE_NULL); - NewEntry = ExAllocatePoolWithTag(NonPagedPool, EntrySize, TAG_LDR_WSTR); + NewEntry = ExAllocatePoolWithTag(NonPagedPool, EntrySize, TAG_MODULE_OBJECT); if (!NewEntry) return FALSE; /* Copy the entry over */ @@ -2561,7 +2561,7 @@ } /* Allocate a buffer we'll use for names */ - Buffer = ExAllocatePoolWithTag(NonPagedPool, MAX_PATH, 'nLmM'); + Buffer = ExAllocatePoolWithTag(NonPagedPool, MAX_PATH, TAG_LDR_WSTR); if (!Buffer) return STATUS_INSUFFICIENT_RESOURCES; /* Check for a separator */ @@ -2906,7 +2906,7 @@ if (LdrEntry->FullDllName.Buffer) { /* Free it */ - ExFreePool(LdrEntry->FullDllName.Buffer); + ExFreePoolWithTag(LdrEntry->FullDllName.Buffer, TAG_LDR_WSTR); } /* Free the entry itself */ @@ -3004,7 +3004,7 @@ /* if (NamePrefix) ExFreePool(PrefixName.Buffer); */ /* Free the name buffer and return status */ - ExFreePoolWithTag(Buffer, 'nLmM'); + ExFreePoolWithTag(Buffer, TAG_LDR_WSTR); return Status; } Modified: trunk/reactos/ntoskrnl/mm/marea.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/marea.c?rev=52…
============================================================================== --- trunk/reactos/ntoskrnl/mm/marea.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/marea.c [iso-8859-1] Wed Jun 1 13:39:36 2011 @@ -377,7 +377,7 @@ PMMVAD Vad; ASSERT(marea->Type == MEMORY_AREA_VIRTUAL_MEMORY || marea->Type == MEMORY_AREA_SECTION_VIEW); - Vad = ExAllocatePoolWithTag(NonPagedPool, sizeof(MMVAD), 'Fake'); + Vad = ExAllocatePoolWithTag(NonPagedPool, sizeof(MMVAD), TAG_MVAD); ASSERT(Vad); RtlZeroMemory(Vad, sizeof(MMVAD)); Vad->StartingVpn = PAGE_ROUND_DOWN(marea->StartingAddress) >> PAGE_SHIFT; @@ -776,7 +776,7 @@ MiRemoveNode(MemoryArea->Vad, &Process->VadRoot); } - ExFreePool(MemoryArea->Vad); + ExFreePoolWithTag(MemoryArea->Vad, TAG_MVAD); MemoryArea->Vad = NULL; } } Modified: trunk/reactos/ntoskrnl/ob/obname.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obname.c?rev=5…
============================================================================== --- trunk/reactos/ntoskrnl/ob/obname.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ob/obname.c [iso-8859-1] Wed Jun 1 13:39:36 2011 @@ -694,7 +694,7 @@ ObjectHeader))) { /* Either couldn't allocate the name, or insert failed */ - if (NewName) ExFreePool(NewName); + if (NewName) ExFreePoolWithTag(NewName, OB_NAME_TAG); /* Fail due to memory reasons */ Status = STATUS_INSUFFICIENT_RESOURCES; Modified: trunk/reactos/ntoskrnl/ob/obsdcach.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obsdcach.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ob/obsdcach.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ob/obsdcach.c [iso-8859-1] Wed Jun 1 13:39:36 2011 @@ -132,7 +132,7 @@ /* Calculate the memory we'll need to allocate and allocate it */ CacheSize = Length + (sizeof(SECURITY_DESCRIPTOR_HEADER) - sizeof(QUAD)); - SdHeader = ExAllocatePoolWithTag(PagedPool, CacheSize, 'cSbO'); + SdHeader = ExAllocatePoolWithTag(PagedPool, CacheSize, TAG_OB_SD_CACHE); if (!SdHeader) return NULL; /* Setup the header */ Modified: trunk/reactos/ntoskrnl/se/acl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/acl.c?rev=5204…
============================================================================== --- trunk/reactos/ntoskrnl/se/acl.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/se/acl.c [iso-8859-1] Wed Jun 1 13:39:36 2011 @@ -311,7 +311,7 @@ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { /* Free the ACL and return the exception code */ - ExFreePool(NewAcl); + ExFreePoolWithTag(NewAcl, TAG_ACL); _SEH2_YIELD(return _SEH2_GetExceptionCode()); } _SEH2_END; @@ -361,7 +361,7 @@ (AccessMode != KernelMode || (AccessMode == KernelMode && CaptureIfKernel))) { - ExFreePool(CapturedAcl); + ExFreePoolWithTag(CapturedAcl, TAG_ACL); } } Modified: trunk/reactos/ntoskrnl/se/sd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/sd.c?rev=52043…
============================================================================== --- trunk/reactos/ntoskrnl/se/sd.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/se/sd.c [iso-8859-1] Wed Jun 1 13:39:36 2011 @@ -686,7 +686,7 @@ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { /* We failed to copy the data to the new descriptor */ - ExFreePool(NewDescriptor); + ExFreePoolWithTag(NewDescriptor, TAG_SD); _SEH2_YIELD(return _SEH2_GetExceptionCode()); } _SEH2_END; @@ -1248,7 +1248,7 @@ if (*SecurityDescriptor != NULL) { - ExFreePool(*SecurityDescriptor); + ExFreePoolWithTag(*SecurityDescriptor, TAG_SD); *SecurityDescriptor = NULL; } Modified: trunk/reactos/ntoskrnl/se/sid.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/sid.c?rev=5204…
============================================================================== --- trunk/reactos/ntoskrnl/se/sid.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/se/sid.c [iso-8859-1] Wed Jun 1 13:39:36 2011 @@ -60,34 +60,34 @@ NTAPI FreeInitializedSids(VOID) { - if (SeNullSid) ExFreePool(SeNullSid); - if (SeWorldSid) ExFreePool(SeWorldSid); - if (SeLocalSid) ExFreePool(SeLocalSid); - if (SeCreatorOwnerSid) ExFreePool(SeCreatorOwnerSid); - if (SeCreatorGroupSid) ExFreePool(SeCreatorGroupSid); - if (SeCreatorOwnerServerSid) ExFreePool(SeCreatorOwnerServerSid); - if (SeCreatorGroupServerSid) ExFreePool(SeCreatorGroupServerSid); - if (SeNtAuthoritySid) ExFreePool(SeNtAuthoritySid); - if (SeDialupSid) ExFreePool(SeDialupSid); - if (SeNetworkSid) ExFreePool(SeNetworkSid); - if (SeBatchSid) ExFreePool(SeBatchSid); - if (SeInteractiveSid) ExFreePool(SeInteractiveSid); - if (SeServiceSid) ExFreePool(SeServiceSid); - if (SePrincipalSelfSid) ExFreePool(SePrincipalSelfSid); - if (SeLocalSystemSid) ExFreePool(SeLocalSystemSid); - if (SeAuthenticatedUserSid) ExFreePool(SeAuthenticatedUserSid); - if (SeRestrictedCodeSid) ExFreePool(SeRestrictedCodeSid); - if (SeAliasAdminsSid) ExFreePool(SeAliasAdminsSid); - if (SeAliasUsersSid) ExFreePool(SeAliasUsersSid); - if (SeAliasGuestsSid) ExFreePool(SeAliasGuestsSid); - if (SeAliasPowerUsersSid) ExFreePool(SeAliasPowerUsersSid); - if (SeAliasAccountOpsSid) ExFreePool(SeAliasAccountOpsSid); - if (SeAliasSystemOpsSid) ExFreePool(SeAliasSystemOpsSid); - if (SeAliasPrintOpsSid) ExFreePool(SeAliasPrintOpsSid); - if (SeAliasBackupOpsSid) ExFreePool(SeAliasBackupOpsSid); - if (SeAuthenticatedUsersSid) ExFreePool(SeAuthenticatedUsersSid); - if (SeRestrictedSid) ExFreePool(SeRestrictedSid); - if (SeAnonymousLogonSid) ExFreePool(SeAnonymousLogonSid); + if (SeNullSid) ExFreePoolWithTag(SeNullSid, TAG_SID); + if (SeWorldSid) ExFreePoolWithTag(SeWorldSid, TAG_SID); + if (SeLocalSid) ExFreePoolWithTag(SeLocalSid, TAG_SID); + if (SeCreatorOwnerSid) ExFreePoolWithTag(SeCreatorOwnerSid, TAG_SID); + if (SeCreatorGroupSid) ExFreePoolWithTag(SeCreatorGroupSid, TAG_SID); + if (SeCreatorOwnerServerSid) ExFreePoolWithTag(SeCreatorOwnerServerSid, TAG_SID); + if (SeCreatorGroupServerSid) ExFreePoolWithTag(SeCreatorGroupServerSid, TAG_SID); + if (SeNtAuthoritySid) ExFreePoolWithTag(SeNtAuthoritySid, TAG_SID); + if (SeDialupSid) ExFreePoolWithTag(SeDialupSid, TAG_SID); + if (SeNetworkSid) ExFreePoolWithTag(SeNetworkSid, TAG_SID); + if (SeBatchSid) ExFreePoolWithTag(SeBatchSid, TAG_SID); + if (SeInteractiveSid) ExFreePoolWithTag(SeInteractiveSid, TAG_SID); + if (SeServiceSid) ExFreePoolWithTag(SeServiceSid, TAG_SID); + if (SePrincipalSelfSid) ExFreePoolWithTag(SePrincipalSelfSid, TAG_SID); + if (SeLocalSystemSid) ExFreePoolWithTag(SeLocalSystemSid, TAG_SID); + if (SeAuthenticatedUserSid) ExFreePoolWithTag(SeAuthenticatedUserSid, TAG_SID); + if (SeRestrictedCodeSid) ExFreePoolWithTag(SeRestrictedCodeSid, TAG_SID); + if (SeAliasAdminsSid) ExFreePoolWithTag(SeAliasAdminsSid, TAG_SID); + if (SeAliasUsersSid) ExFreePoolWithTag(SeAliasUsersSid, TAG_SID); + if (SeAliasGuestsSid) ExFreePoolWithTag(SeAliasGuestsSid, TAG_SID); + if (SeAliasPowerUsersSid) ExFreePoolWithTag(SeAliasPowerUsersSid, TAG_SID); + if (SeAliasAccountOpsSid) ExFreePoolWithTag(SeAliasAccountOpsSid, TAG_SID); + if (SeAliasSystemOpsSid) ExFreePoolWithTag(SeAliasSystemOpsSid, TAG_SID); + if (SeAliasPrintOpsSid) ExFreePoolWithTag(SeAliasPrintOpsSid, TAG_SID); + if (SeAliasBackupOpsSid) ExFreePoolWithTag(SeAliasBackupOpsSid, TAG_SID); + if (SeAuthenticatedUsersSid) ExFreePoolWithTag(SeAuthenticatedUsersSid, TAG_SID); + if (SeRestrictedSid) ExFreePoolWithTag(SeRestrictedSid, TAG_SID); + if (SeAnonymousLogonSid) ExFreePoolWithTag(SeAnonymousLogonSid, TAG_SID); } BOOLEAN @@ -306,7 +306,7 @@ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { /* Free the SID and return the exception code */ - ExFreePool(NewSid); + ExFreePoolWithTag(NewSid, TAG_SID); _SEH2_YIELD(return _SEH2_GetExceptionCode()); } _SEH2_END; @@ -357,7 +357,7 @@ (AccessMode != KernelMode || (AccessMode == KernelMode && CaptureIfKernel))) { - ExFreePool(CapturedSid); + ExFreePoolWithTag(CapturedSid, TAG_SID); } } Modified: trunk/reactos/ntoskrnl/se/token.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/se/token.c?rev=52…
============================================================================== --- trunk/reactos/ntoskrnl/se/token.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/se/token.c [iso-8859-1] Wed Jun 1 13:39:36 2011 @@ -293,7 +293,7 @@ AccessToken->UserAndGroups = (PSID_AND_ATTRIBUTES)ExAllocatePoolWithTag(PagedPool, uLength, - 'uKOT'); + TAG_TOKEN_USERS); EndMem = &AccessToken->UserAndGroups[AccessToken->UserAndGroupCount]; @@ -320,7 +320,7 @@ AccessToken->Privileges = (PLUID_AND_ATTRIBUTES)ExAllocatePoolWithTag(PagedPool, uLength, - 'pKOT'); + TAG_TOKEN_PRIVILAGES); for (i = 0; i < AccessToken->PrivilegeCount; i++) { @@ -335,7 +335,7 @@ AccessToken->DefaultDacl = (PACL) ExAllocatePoolWithTag(PagedPool, Token->DefaultDacl->AclSize, - 'kDOT'); + TAG_TOKEN_ACL); memcpy(AccessToken->DefaultDacl, Token->DefaultDacl, Token->DefaultDacl->AclSize); @@ -460,13 +460,13 @@ PTOKEN AccessToken = (PTOKEN)ObjectBody; if (AccessToken->UserAndGroups) - ExFreePool(AccessToken->UserAndGroups); + ExFreePoolWithTag(AccessToken->UserAndGroups, TAG_TOKEN_USERS); if (AccessToken->Privileges) - ExFreePool(AccessToken->Privileges); + ExFreePoolWithTag(AccessToken->Privileges, TAG_TOKEN_PRIVILAGES); if (AccessToken->DefaultDacl) - ExFreePool(AccessToken->DefaultDacl); + ExFreePoolWithTag(AccessToken->DefaultDacl, TAG_TOKEN_ACL); } @@ -639,7 +639,7 @@ AccessToken->UserAndGroups = (PSID_AND_ATTRIBUTES)ExAllocatePoolWithTag(PagedPool, uLength, - 'uKOT'); + TAG_TOKEN_USERS); EndMem = &AccessToken->UserAndGroups[AccessToken->UserAndGroupCount]; @@ -675,7 +675,7 @@ AccessToken->Privileges = (PLUID_AND_ATTRIBUTES)ExAllocatePoolWithTag(PagedPool, uLength, - 'pKOT'); + TAG_TOKEN_PRIVILAGES); if (PreviousMode != KernelMode) { @@ -704,7 +704,7 @@ AccessToken->DefaultDacl = (PACL) ExAllocatePoolWithTag(PagedPool, DefaultDacl->AclSize, - 'kDOT'); + TAG_TOKEN_ACL); memcpy(AccessToken->DefaultDacl, DefaultDacl, DefaultDacl->AclSize); @@ -1720,7 +1720,7 @@ /* Free the previous dacl if present */ if(Token->DefaultDacl != NULL) { - ExFreePool(Token->DefaultDacl); + ExFreePoolWithTag(Token->DefaultDacl, TAG_TOKEN_ACL); } /* Set the new dacl */ @@ -1732,7 +1732,7 @@ /* Clear and free the default dacl if present */ if (Token->DefaultDacl != NULL) { - ExFreePool(Token->DefaultDacl); + ExFreePoolWithTag(Token->DefaultDacl, TAG_TOKEN_ACL); Token->DefaultDacl = NULL; } } @@ -2478,7 +2478,7 @@ PreviousMode, &hToken); } - if (Dacl) ExFreePool(Dacl); + if (Dacl) ExFreePoolWithTag(Dacl, TAG_TOKEN_ACL); if (OpenAsSelf) {
13 years, 6 months
1
0
0
0
← Newer
1
...
42
43
44
45
46
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
Results per page:
10
25
50
100
200