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
February 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
18 participants
352 discussions
Start a n
N
ew thread
[fireball] 50686: [RTL/DPH] - Implement list manipulation routines: pool list, virtual list, unused list. - Implement node removal from an available list.
by fireball@svn.reactos.org
Author: fireball Date: Sun Feb 13 21:39:26 2011 New Revision: 50686 URL:
http://svn.reactos.org/svn/reactos?rev=50686&view=rev
Log: [RTL/DPH] - Implement list manipulation routines: pool list, virtual list, unused list. - Implement node removal from an available list. Modified: trunk/reactos/lib/rtl/heappage.c Modified: trunk/reactos/lib/rtl/heappage.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/heappage.c?rev=506…
============================================================================== --- trunk/reactos/lib/rtl/heappage.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/heappage.c [iso-8859-1] Sun Feb 13 21:39:26 2011 @@ -143,6 +143,11 @@ /* Signatures */ #define DPH_SIGNATURE 0xFFEEDDCC +/* Biased pointer macros */ +#define IS_BIASED_POINTER(ptr) ((ULONG_PTR)(ptr) & 1) +#define POINTER_REMOVE_BIAS(ptr) ((ULONG_PTR)(ptr) & ~(ULONG_PTR)1) +#define POINTER_ADD_BIAS(ptr) ((ULONG_PTR)(ptr) & 1) + /* FUNCTIONS ******************************************************************/ NTSTATUS NTAPI @@ -268,7 +273,99 @@ } VOID NTAPI -RtlpDphAddNewPool(PDPH_HEAP_ROOT DphRoot, PDPH_HEAP_BLOCK NodeBlock, PVOID Virtual, SIZE_T Size, BOOLEAN Add) +RtlpDphPlaceOnPoolList(PDPH_HEAP_ROOT DphRoot, PDPH_HEAP_BLOCK DphNode) +{ + /* DphNode is being added to the tail of the list */ + DphNode->pNextAlloc = NULL; + + /* Add it to the tail of the linked list */ + if (DphRoot->pNodePoolListTail) + DphRoot->pNodePoolListTail->pNextAlloc = DphNode; + else + DphRoot->pNodePoolListHead = DphNode; + DphRoot->pNodePoolListTail = DphNode; + + /* Update byte counts taking in account this new node */ + DphRoot->nNodePools++; + DphRoot->nNodePoolBytes += DphNode->nVirtualBlockSize; +} + +VOID NTAPI +RtlpDphPlaceOnVirtualList(PDPH_HEAP_ROOT DphRoot, PDPH_HEAP_BLOCK DphNode) +{ + /* Add it to the head of the virtual list */ + DphNode->pNextAlloc = DphRoot->pVirtualStorageListHead; + if (!DphRoot->pVirtualStorageListHead) + DphRoot->pVirtualStorageListTail = DphNode; + DphRoot->pVirtualStorageListHead = DphNode; + + /* Update byte counts taking in account this new node */ + DphRoot->nVirtualStorageRanges++; + DphRoot->nVirtualStorageBytes += DphNode->nVirtualBlockSize; +} + +PDPH_HEAP_BLOCK NTAPI +RtlpDphTakeNodeFromUnusedList(PDPH_HEAP_ROOT DphRoot) +{ + PDPH_HEAP_BLOCK Node = DphRoot->pUnusedNodeListHead; + PDPH_HEAP_BLOCK Next; + + /* Take the first entry */ + if (!Node) return NULL; + + /* Remove that entry (Node) from the list */ + Next = Node->pNextAlloc; + if (DphRoot->pUnusedNodeListHead == Node) DphRoot->pUnusedNodeListHead = Next; + if (DphRoot->pUnusedNodeListTail == Node) DphRoot->pUnusedNodeListTail = NULL; + + /* Decrease amount of unused nodes */ + DphRoot->nUnusedNodes--; + + return Node; +} + +VOID NTAPI +RtlpDphReturnNodeToUnusedList(PDPH_HEAP_ROOT DphRoot, + PDPH_HEAP_BLOCK Node) +{ + /* Add it back to the head of the unused list */ + Node->pNextAlloc = DphRoot->pUnusedNodeListHead; + if (!DphRoot->pUnusedNodeListHead) DphRoot->pUnusedNodeListTail = Node; + DphRoot->pUnusedNodeListHead = Node; + + /* Increase amount of unused nodes */ + DphRoot->nUnusedNodes++; +} + +VOID NTAPI +RtlpDphRemoveFromAvailableList(PDPH_HEAP_ROOT DphRoot, + PDPH_HEAP_BLOCK Node) +{ + /* Make sure Adjacency list pointers are biased */ + ASSERT(IS_BIASED_POINTER(Node->AdjacencyEntry.Flink)); + ASSERT(IS_BIASED_POINTER(Node->AdjacencyEntry.Blink)); + + /* Remove it from the list */ + RemoveEntryList(&Node->AvailableEntry); + + /* Decrease heap counters */ + DphRoot->nAvailableAllocations--; + DphRoot->nAvailableAllocationBytesCommitted -= Node->nVirtualBlockSize; + + /* Remove bias from the AdjacencyEntry pointer */ + POINTER_REMOVE_BIAS(Node->AdjacencyEntry.Flink); + POINTER_REMOVE_BIAS(Node->AdjacencyEntry.Blink); +} + +VOID NTAPI +RtlpDphCoalesceNodeIntoAvailable(PDPH_HEAP_ROOT DphRoot, + PDPH_HEAP_BLOCK Node) +{ + UNIMPLEMENTED; +} + +VOID NTAPI +RtlpDphAddNewPool(PDPH_HEAP_ROOT DphRoot, PDPH_HEAP_BLOCK NodeBlock, PVOID Virtual, SIZE_T Size, BOOLEAN PlaceOnPool) { PDPH_HEAP_BLOCK DphNode, DphStartNode; ULONG NodeCount; @@ -294,9 +391,19 @@ /* Increase counters */ DphRoot->nUnusedNodes += NodeCount; - if (Add) - { - UNIMPLEMENTED; + /* Check if we need to place it on the pool list */ + if (PlaceOnPool) + { + /* Get a node from the unused list */ + DphNode = RtlpDphTakeNodeFromUnusedList(DphRoot); + ASSERT(DphNode); + + /* Set its virtual block values */ + DphNode->pVirtualBlock = Virtual; + DphNode->nVirtualBlockSize = Size; + + /* Place it on the pool list */ + RtlpDphPlaceOnPoolList(DphRoot, DphNode); } } @@ -307,34 +414,6 @@ { UNIMPLEMENTED; return NULL; -} - - -PDPH_HEAP_BLOCK NTAPI -RtlpDphTakeNodeFromUnusedList(PDPH_HEAP_ROOT DphRoot) -{ - UNIMPLEMENTED; - return NULL; -} - -VOID NTAPI -RtlpDphReturnNodeToUnusedList(PDPH_HEAP_ROOT DphRoot, - PDPH_HEAP_BLOCK Node) -{ -} - -VOID NTAPI -RtlpDphRemoveFromAvailableList(PDPH_HEAP_ROOT DphRoot, - PDPH_HEAP_BLOCK Node) -{ - UNIMPLEMENTED; -} - -VOID NTAPI -RtlpDphCoalesceNodeIntoAvailable(PDPH_HEAP_ROOT DphRoot, - PDPH_HEAP_BLOCK Node) -{ - UNIMPLEMENTED; } PDPH_HEAP_BLOCK NTAPI @@ -420,18 +499,6 @@ } return RtlpDphTakeNodeFromUnusedList(DphRoot); -} - -VOID NTAPI -RtlpDphPlaceOnPoolList(PDPH_HEAP_ROOT DphRoot, PDPH_HEAP_BLOCK DphNode) -{ - UNIMPLEMENTED; -} - -VOID NTAPI -RtlpDphPlaceOnVirtualList(PDPH_HEAP_ROOT DphRoot, PDPH_HEAP_BLOCK DphNode) -{ - UNIMPLEMENTED; } RTL_GENERIC_COMPARE_RESULTS
13 years, 10 months
1
0
0
0
[pschweitzer] 50685: [NTOSKRNL] Improved * WC handling for both FsRtlIsNameInExpression & FsRtlIsDbcsInExpression This fixes all failing tests in kmtest
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Sun Feb 13 20:23:03 2011 New Revision: 50685 URL:
http://svn.reactos.org/svn/reactos?rev=50685&view=rev
Log: [NTOSKRNL] Improved * WC handling for both FsRtlIsNameInExpression & FsRtlIsDbcsInExpression This fixes all failing tests in kmtest Modified: trunk/reactos/ntoskrnl/fsrtl/dbcsname.c trunk/reactos/ntoskrnl/fsrtl/name.c Modified: trunk/reactos/ntoskrnl/fsrtl/dbcsname.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fsrtl/dbcsname.c?…
============================================================================== --- trunk/reactos/ntoskrnl/fsrtl/dbcsname.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/fsrtl/dbcsname.c [iso-8859-1] Sun Feb 13 20:23:03 2011 @@ -174,6 +174,45 @@ NamePosition++; ExpressionPosition++; } + else if (StarFound != MAXUSHORT && (Expression->Buffer[StarFound + 1] == '*' || + Expression->Buffer[StarFound + 1] == '?' || Expression->Buffer[StarFound + 1] == ANSI_DOS_DOT)) + { + ExpressionPosition = StarFound + 1; + switch (Expression->Buffer[ExpressionPosition]) + { + case '*': + StarFound = ExpressionPosition++; + break; + + case '?': + ExpressionPosition++; + MatchingChars = NamePosition; + while (Name->Buffer[NamePosition] != Expression->Buffer[ExpressionPosition] && + NamePosition < Name->Length) + { + NamePosition++; + } + + if (NamePosition - MatchingChars > 0) + { + StarFound = MAXUSHORT; + } + break; + + case ANSI_DOS_DOT: + while (Name->Buffer[NamePosition] != '.' && NamePosition < Name->Length) + { + NamePosition++; + } + ExpressionPosition++; + StarFound = MAXUSHORT; + break; + + default: + /* Should never happen */ + ASSERT(FALSE); + } + } else if ((Expression->Buffer[ExpressionPosition] == '?') || (Expression->Buffer[ExpressionPosition] == ANSI_DOS_QM) || (Expression->Buffer[ExpressionPosition] == ANSI_DOS_DOT && Name->Buffer[NamePosition] == '.')) { @@ -206,15 +245,10 @@ else if (StarFound != MAXUSHORT) { ExpressionPosition = StarFound + 1; - if (Expression->Buffer[ExpressionPosition] != '*' && Expression->Buffer[ExpressionPosition] != '?' && - Expression->Buffer[ExpressionPosition] != ANSI_DOS_DOT && Expression->Buffer[ExpressionPosition] != ANSI_DOS_QM && - Expression->Buffer[ExpressionPosition] != ANSI_DOS_STAR) - { - while (Name->Buffer[NamePosition] != Expression->Buffer[ExpressionPosition] && - NamePosition < Name->Length) - { - NamePosition++; - } + while (Name->Buffer[NamePosition] != Expression->Buffer[ExpressionPosition] && + NamePosition < Name->Length) + { + NamePosition++; } } else Modified: trunk/reactos/ntoskrnl/fsrtl/name.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fsrtl/name.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/fsrtl/name.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/fsrtl/name.c [iso-8859-1] Sun Feb 13 20:23:03 2011 @@ -34,6 +34,47 @@ NamePosition++; ExpressionPosition++; } + else if (StarFound != MAXUSHORT && (Expression->Buffer[StarFound + 1] == L'*' || + Expression->Buffer[StarFound + 1] == L'?' || Expression->Buffer[StarFound + 1] == DOS_DOT)) + { + ExpressionPosition = StarFound + 1; + switch (Expression->Buffer[ExpressionPosition]) + { + case L'*': + StarFound = ExpressionPosition++; + break; + + case L'?': + ExpressionPosition++; + MatchingChars = NamePosition; + while ((IgnoreCase ? UpcaseTable[Name->Buffer[NamePosition]] : + Name->Buffer[NamePosition]) != Expression->Buffer[ExpressionPosition] && + NamePosition < Name->Length / sizeof(WCHAR)) + { + NamePosition++; + } + + if (NamePosition - MatchingChars > 0) + { + StarFound = MAXUSHORT; + } + break; + + case DOS_DOT: + while (Name->Buffer[NamePosition] != L'.' && + NamePosition < Name->Length / sizeof(WCHAR)) + { + NamePosition++; + } + ExpressionPosition++; + StarFound = MAXUSHORT; + break; + + default: + /* Should never happen */ + ASSERT(FALSE); + } + } else if (Expression->Buffer[ExpressionPosition] == L'?' || (Expression->Buffer[ExpressionPosition] == DOS_QM) || (Expression->Buffer[ExpressionPosition] == DOS_DOT && Name->Buffer[NamePosition] == L'.')) { @@ -66,15 +107,11 @@ else if (StarFound != MAXUSHORT) { ExpressionPosition = StarFound + 1; - if (Expression->Buffer[ExpressionPosition] != L'*' && Expression->Buffer[ExpressionPosition] != L'?' && - Expression->Buffer[ExpressionPosition] != DOS_DOT && Expression->Buffer[ExpressionPosition] != DOS_QM && - Expression->Buffer[ExpressionPosition] != DOS_STAR) - { - while ((IgnoreCase ? UpcaseTable[Name->Buffer[NamePosition]] : Name->Buffer[NamePosition]) != Expression->Buffer[ExpressionPosition] && - NamePosition < Name->Length / sizeof(WCHAR)) - { - NamePosition++; - } + while ((IgnoreCase ? UpcaseTable[Name->Buffer[NamePosition]] : + Name->Buffer[NamePosition]) != Expression->Buffer[ExpressionPosition] && + NamePosition < Name->Length / sizeof(WCHAR)) + { + NamePosition++; } } else
13 years, 10 months
1
0
0
0
[akhaldi] 50684: [CMAKE] - Fix host checking and the unix case handling in today() macro. - Fixes unix build.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Feb 13 19:01:08 2011 New Revision: 50684 URL:
http://svn.reactos.org/svn/reactos?rev=50684&view=rev
Log: [CMAKE] - Fix host checking and the unix case handling in today() macro. - Fixes unix build. Modified: branches/cmake-bringup/include/reactos/version.cmake Modified: branches/cmake-bringup/include/reactos/version.cmake URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/include/reactos/v…
============================================================================== --- branches/cmake-bringup/include/reactos/version.cmake [iso-8859-1] (original) +++ branches/cmake-bringup/include/reactos/version.cmake [iso-8859-1] Sun Feb 13 19:01:08 2011 @@ -1,14 +1,15 @@ macro(today RESULT) - if (WIN32) + if(CMAKE_HOST_WIN32) execute_process(COMMAND "${REACTOS_SOURCE_DIR}/tools/getdate.exe" OUTPUT_VARIABLE ${RESULT}) string(STRIP ${${RESULT}} ${RESULT}) - elseif(UNIX) - execute_process(COMMAND "date" "+%Y%m%d" OUTPUT_VARIABLE ${${RESULT}}) - else (WIN32) + elseif(CMAKE_HOST_UNIX) + execute_process(COMMAND "date" "+%Y%m%d" OUTPUT_VARIABLE ${RESULT}) + string(STRIP ${${RESULT}} ${RESULT}) + else() message(SEND_ERROR "date not implemented") set(${RESULT} 00000000) - endif (WIN32) -endmacro(today) + endif() +endmacro() macro(inttohex INTVALUE OUTPUT_VARIABLE) list(APPEND HEXLIST 0 1 2 3 4 5 6 7 8 9 a b c d e f)
13 years, 10 months
1
0
0
0
[fireball] 50683: [RTL/DPH] - Implement adding a new pool and allocating a new node. - Add a bunch of stubs.
by fireball@svn.reactos.org
Author: fireball Date: Sun Feb 13 16:03:58 2011 New Revision: 50683 URL:
http://svn.reactos.org/svn/reactos?rev=50683&view=rev
Log: [RTL/DPH] - Implement adding a new pool and allocating a new node. - Add a bunch of stubs. Modified: trunk/reactos/lib/rtl/heappage.c Modified: trunk/reactos/lib/rtl/heappage.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/heappage.c?rev=506…
============================================================================== --- trunk/reactos/lib/rtl/heappage.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/heappage.c [iso-8859-1] Sun Feb 13 16:03:58 2011 @@ -270,14 +270,156 @@ VOID NTAPI RtlpDphAddNewPool(PDPH_HEAP_ROOT DphRoot, PDPH_HEAP_BLOCK NodeBlock, PVOID Virtual, SIZE_T Size, BOOLEAN Add) { + PDPH_HEAP_BLOCK DphNode, DphStartNode; + ULONG NodeCount; + + NodeCount = (Size >> 6) - 1; + DphStartNode = Virtual; + + /* Set pNextAlloc for all blocks */ + for (DphNode = Virtual; NodeCount > 0; DphNode++, NodeCount--) + DphNode->pNextAlloc = DphNode + 1; + + /* and the last one */ + DphNode->pNextAlloc = NULL; + + /* Add it to the tail of unused node list */ + if (DphRoot->pUnusedNodeListTail) + DphRoot->pUnusedNodeListTail->pNextAlloc = DphStartNode; + else + DphRoot->pUnusedNodeListHead = DphStartNode; + + DphRoot->pUnusedNodeListTail = DphNode; + + /* Increase counters */ + DphRoot->nUnusedNodes += NodeCount; + + if (Add) + { + UNIMPLEMENTED; + } +} + +PDPH_HEAP_BLOCK NTAPI +RtlpDphFindAvailableMemory(PDPH_HEAP_ROOT DphRoot, + SIZE_T Size, + PDPH_HEAP_BLOCK *Prev) +{ + UNIMPLEMENTED; + return NULL; +} + + +PDPH_HEAP_BLOCK NTAPI +RtlpDphTakeNodeFromUnusedList(PDPH_HEAP_ROOT DphRoot) +{ + UNIMPLEMENTED; + return NULL; +} + +VOID NTAPI +RtlpDphReturnNodeToUnusedList(PDPH_HEAP_ROOT DphRoot, + PDPH_HEAP_BLOCK Node) +{ +} + +VOID NTAPI +RtlpDphRemoveFromAvailableList(PDPH_HEAP_ROOT DphRoot, + PDPH_HEAP_BLOCK Node) +{ + UNIMPLEMENTED; +} + +VOID NTAPI +RtlpDphCoalesceNodeIntoAvailable(PDPH_HEAP_ROOT DphRoot, + PDPH_HEAP_BLOCK Node) +{ UNIMPLEMENTED; } PDPH_HEAP_BLOCK NTAPI RtlpDphAllocateNode(PDPH_HEAP_ROOT DphRoot) { - UNIMPLEMENTED; - return NULL; + PDPH_HEAP_BLOCK Node; + NTSTATUS Status; + ULONG Size = DPH_POOL_SIZE; + PVOID Ptr; + + /* Check for the easy case */ + if (DphRoot->pUnusedNodeListHead) + { + /* Just take a node from this list */ + Node = RtlpDphTakeNodeFromUnusedList(DphRoot); + ASSERT(Node); + return Node; + } + + /* There is a need to make free space */ + Node = RtlpDphFindAvailableMemory(DphRoot, DPH_POOL_SIZE, NULL); + + if (!DphRoot->pUnusedNodeListHead && !Node) + { + /* Retry with a smaller request */ + Size = PAGE_SIZE; + Node = RtlpDphFindAvailableMemory(DphRoot, PAGE_SIZE, NULL); + } + + if (!DphRoot->pUnusedNodeListHead) + { + if (Node) + { + RtlpDphRemoveFromAvailableList(DphRoot, Node); + Ptr = Node->pVirtualBlock; + } + else + { + /* No free space, need to alloc a new VM block */ + Size = DPH_POOL_SIZE; + Status = RtlpDphAllocateVm(&Ptr, DPH_RESERVE_SIZE, MEM_COMMIT, PAGE_NOACCESS); + + if (!NT_SUCCESS(Status)) + { + /* Retry with a smaller size */ + Status = RtlpDphAllocateVm(&Ptr, 0x10000, MEM_COMMIT, PAGE_NOACCESS); + if (!NT_SUCCESS(Status)) return NULL; + } + } + + /* VM is allocated at this point, set protection */ + Status = RtlpDphProtectVm(Ptr, Size, PAGE_READWRITE); + if (!NT_SUCCESS(Status)) + { + ASSERT(FALSE); + return NULL; + } + + /* Zero the memory */ + if (Node) RtlZeroMemory(Ptr, Size); + + /* Add a new pool based on this VM */ + RtlpDphAddNewPool(DphRoot, Node, Ptr, Size, TRUE); + + if (!Node) + { + ASSERT(FALSE); + } + else + { + if (Node->nVirtualBlockSize > Size) + { + Node->pVirtualBlock += Size; + Node->nVirtualBlockSize -= Size; + + RtlpDphCoalesceNodeIntoAvailable(DphRoot, Node); + } + else + { + RtlpDphReturnNodeToUnusedList(DphRoot, Node); + } + } + } + + return RtlpDphTakeNodeFromUnusedList(DphRoot); } VOID NTAPI @@ -288,12 +430,6 @@ VOID NTAPI RtlpDphPlaceOnVirtualList(PDPH_HEAP_ROOT DphRoot, PDPH_HEAP_BLOCK DphNode) -{ - UNIMPLEMENTED; -} - -VOID NTAPI -RtlpDphCoalesceNodeIntoAvailable(PDPH_HEAP_ROOT DphRoot, PDPH_HEAP_BLOCK DphNode) { UNIMPLEMENTED; }
13 years, 10 months
1
0
0
0
[ekohl] 50682: [CFGMGR32] - Add missing functions. - Add forwarders to functions that are exported by setupapi.dll. - Mark deprecated functions.
by ekohl@svn.reactos.org
Author: ekohl Date: Sun Feb 13 10:02:31 2011 New Revision: 50682 URL:
http://svn.reactos.org/svn/reactos?rev=50682&view=rev
Log: [CFGMGR32] - Add missing functions. - Add forwarders to functions that are exported by setupapi.dll. - Mark deprecated functions. Modified: trunk/reactos/dll/win32/cfgmgr32/cfgmgr32.spec Modified: trunk/reactos/dll/win32/cfgmgr32/cfgmgr32.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cfgmgr32/cfgmgr3…
============================================================================== --- trunk/reactos/dll/win32/cfgmgr32/cfgmgr32.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/cfgmgr32/cfgmgr32.spec [iso-8859-1] Sun Feb 13 10:02:31 2011 @@ -1,9 +1,9 @@ @ stdcall CMP_Init_Detection(long) setupapi.CMP_Init_Detection @ stdcall CMP_RegisterNotification(ptr ptr long ptr) setupapi.CMP_RegisterNotification @ stdcall CMP_Report_LogOn(long long) setupapi.CMP_Report_LogOn -@ stub CMP_UnregisterNotification # setupapi.CMP_UnregisterNotification +@ stdcall CMP_UnregisterNotification(ptr) setupapi.CMP_UnregisterNotification @ stdcall CMP_WaitNoPendingInstallEvents(long) setupapi.CMP_WaitNoPendingInstallEvents -@ stub CMP_WaitServicesAvailable # setupapi.CMP_WaitServicesAvailable +@ stdcall CMP_WaitServicesAvailable(ptr) setupapi.CMP_WaitServicesAvailable @ stdcall CM_Add_Empty_Log_Conf(ptr ptr long long) setupapi.CM_Add_Empty_Log_Conf @ stdcall CM_Add_Empty_Log_Conf_Ex(ptr ptr long long ptr) setupapi.CM_Add_Empty_Log_Conf_Ex @ stdcall CM_Add_IDA(ptr str long) setupapi.CM_Add_IDA @@ -11,8 +11,8 @@ @ stdcall CM_Add_ID_ExA(ptr str long ptr) setupapi.CM_Add_ID_ExA @ stdcall CM_Add_ID_ExW(ptr wstr long ptr) setupapi.CM_Add_ID_ExW @ stub CM_Add_Range # setupapi.CM_Add_Range -@ stub CM_Add_Res_Des # setupapi.CM_Add_Res_Des -@ stub CM_Add_Res_Des_Ex # setupapi.CM_Add_Res_Des_Ex +@ stdcall CM_Add_Res_Des(ptr ptr long ptr long long) setupapi.CM_Add_Res_Des +@ stdcall CM_Add_Res_Des_Ex(ptr ptr long ptr long long long) setupapi.CM_Add_Res_Des_Ex @ stdcall CM_Connect_MachineA(str ptr) setupapi.CM_Connect_MachineA @ stdcall CM_Connect_MachineW(wstr ptr) setupapi.CM_Connect_MachineW @ stdcall CM_Create_DevNodeA(ptr str long long) setupapi.CM_Create_DevNodeA @@ -45,9 +45,10 @@ @ stdcall CM_Free_Log_Conf_Ex(ptr long ptr) setupapi.CM_Free_Log_Conf_Ex @ stdcall CM_Free_Log_Conf_Handle(ptr) setupapi.CM_Free_Log_Conf_Handle @ stub CM_Free_Range_List # setupapi.CM_Free_Range_List -@ stub CM_Free_Res_Des # setupapi.CM_Free_Res_Des -@ stub CM_Free_Res_Des_Ex # setupapi.CM_Free_Res_Des_Ex -@ stub CM_Free_Res_Des_Handle # setupapi.CM_Free_Res_Des_Handle +@ stdcall CM_Free_Res_Des(ptr ptr long) setupapi.CM_Free_Res_Des +@ stdcall CM_Free_Res_Des_Ex(ptr ptr long long) setupapi.CM_Free_Res_Des_Ex +@ stdcall CM_Free_Res_Des_Handle(ptr) setupapi.CM_Free_Res_Des_Handle +@ stub CM_Free_Resource_Conflict_Handle # setupapi.CM_Free_Resource_Conflict_Handle @ stdcall CM_Get_Child(ptr long long) setupapi.CM_Get_Child @ stdcall CM_Get_Child_Ex(ptr long long long) setupapi.CM_Get_Child_Ex @ stdcall CM_Get_Class_Key_NameA(ptr str ptr long) setupapi.CM_Get_Class_Key_NameA @@ -58,6 +59,8 @@ @ stdcall CM_Get_Class_NameW(ptr wstr ptr long) setupapi.CM_Get_Class_NameW @ stdcall CM_Get_Class_Name_ExA(ptr str ptr long long) setupapi.CM_Get_Class_Name_ExA @ stdcall CM_Get_Class_Name_ExW(ptr wstr ptr long long) setupapi.CM_Get_Class_Name_ExW +@ stub CM_Get_Class_Registry_PropertyA # setupapi.CM_Get_Class_Registry_PropertyA +@ stub CM_Get_Class_Registry_PropertyW # setupapi.CM_Get_Class_Registry_PropertyW @ stdcall CM_Get_Depth(ptr long long) setupapi.CM_Get_Depth @ stdcall CM_Get_Depth_Ex(ptr long long long) setupapi.CM_Get_Depth_Ex @ stdcall CM_Get_DevNode_Registry_PropertyA(long long ptr ptr ptr long) setupapi.CM_Get_DevNode_Registry_PropertyA @@ -108,14 +111,17 @@ @ stdcall CM_Get_Log_Conf_Priority_Ex(ptr ptr long long) setupapi.CM_Get_Log_Conf_Priority_Ex @ stdcall CM_Get_Next_Log_Conf(ptr ptr long) setupapi.CM_Get_Next_Log_Conf @ stdcall CM_Get_Next_Log_Conf_Ex(ptr ptr long long) setupapi.CM_Get_Next_Log_Conf_Ex -@ stub CM_Get_Next_Res_Des # setupapi.CM_Get_Next_Res_Des -@ stub CM_Get_Next_Res_Des_Ex # setupapi.CM_Get_Next_Res_Des_Ex +@ stdcall CM_Get_Next_Res_Des(ptr ptr long ptr long) setupapi.CM_Get_Next_Res_Des +@ stdcall CM_Get_Next_Res_Des_Ex(ptr ptr long ptr long long) setupapi.CM_Get_Next_Res_Des_Ex @ stdcall CM_Get_Parent(ptr long long) setupapi.CM_Get_Parent @ stdcall CM_Get_Parent_Ex(ptr long long long) setupapi.CM_Get_Parent_Ex -@ stub CM_Get_Res_Des_Data # setupapi.CM_Get_Res_Des_Data -@ stub CM_Get_Res_Des_Data_Ex # setupapi.CM_Get_Res_Des_Data_Ex -@ stub CM_Get_Res_Des_Data_Size # setupapi.CM_Get_Res_Des_Data_Size -@ stub CM_Get_Res_Des_Data_Size_Ex # setupapi.CM_Get_Res_Des_Data_Size_Ex +@ stdcall CM_Get_Res_Des_Data(ptr ptr long long) setupapi.CM_Get_Res_Des_Data +@ stdcall CM_Get_Res_Des_Data_Ex(ptr ptr long long long) setupapi.CM_Get_Res_Des_Data_Ex +@ stdcall CM_Get_Res_Des_Data_Size(ptr ptr long) setupapi.CM_Get_Res_Des_Data_Size +@ stdcall CM_Get_Res_Des_Data_Size_Ex(ptr ptr long long) setupapi.CM_Get_Res_Des_Data_Size_Ex +@ stub CM_Get_Resource_Conflict_Count # setupapi.CM_Get_Resource_Conflict_Count +@ stub CM_Get_Resource_Conflict_DetailsA # setupapi.CM_Get_Resource_Conflict_DetailsA +@ stub CM_Get_Resource_Conflict_DetailsW # setupapi.CM_Get_Resource_Conflict_DetailsW @ stdcall CM_Get_Sibling(ptr long long) setupapi.CM_Get_Sibling @ stdcall CM_Get_Sibling_Ex(ptr long long long) setupapi.CM_Get_Sibling_Ex @ stdcall CM_Get_Version() setupapi.CM_Get_Version @@ -129,8 +135,8 @@ @ stdcall CM_Locate_DevNode_ExA(ptr str long long) setupapi.CM_Locate_DevNode_ExA @ stdcall CM_Locate_DevNode_ExW(ptr wstr long long) setupapi.CM_Locate_DevNode_ExW @ stub CM_Merge_Range_List # setupapi.CM_Merge_Range_List -@ stub CM_Modify_Res_Des # setupapi.CM_Modify_Res_Des -@ stub CM_Modify_Res_Des_Ex # setupapi.CM_Modify_Res_Des_Ex +@ stdcall CM_Modify_Res_Des(ptr ptr long ptr long long) setupapi.CM_Modify_Res_Des +@ stdcall CM_Modify_Res_Des_Ex(ptr ptr long ptr long long long) setupapi.CM_Modify_Res_Des_Ex @ stdcall CM_Move_DevNode(long long long) setupapi.CM_Move_DevNode @ stdcall CM_Move_DevNode_Ex(long long long long) setupapi.CM_Move_DevNode_Ex @ stub CM_Next_Range # setupapi.CM_Next_Range @@ -140,14 +146,17 @@ @ stdcall CM_Open_Class_Key_ExW(ptr wstr long long ptr long long) setupapi.CM_Open_Class_Key_ExW @ stdcall CM_Open_DevNode_Key(ptr long long long ptr long) setupapi.CM_Open_DevNode_Key @ stdcall CM_Open_DevNode_Key_Ex(ptr long long long ptr long long) setupapi.CM_Open_DevNode_Key_Ex -@ stub CM_Query_And_Remove_SubTreeA -@ stub CM_Query_And_Remove_SubTreeW +@ stub CM_Query_And_Remove_SubTreeA # setupapi.CM_Query_And_Remove_SubTreeA +@ stub CM_Query_And_Remove_SubTreeW # setupapi.CM_Query_And_Remove_SubTreeW +@ stub CM_Query_And_Remove_SubTree_ExA # setupapi.CM_Query_And_Remove_SubTree_ExA +@ stub CM_Query_And_Remove_SubTree_ExW # setupapi.CM_Query_And_Remove_SubTree_ExW @ stub CM_Query_Arbitrator_Free_Data # setupapi.CM_Query_Arbitrator_Free_Data @ stub CM_Query_Arbitrator_Free_Data_Ex # setupapi.CM_Query_Arbitrator_Free_Data_Ex @ stub CM_Query_Arbitrator_Free_Size # setupapi.CM_Query_Arbitrator_Free_Size @ stub CM_Query_Arbitrator_Free_Size_Ex # setupapi.CM_Query_Arbitrator_Free_Size_Ex @ stub CM_Query_Remove_SubTree # setupapi.CM_Query_Remove_SubTree @ stub CM_Query_Remove_SubTree_Ex # setupapi.CM_Query_Remove_SubTree_Ex +@ stub CM_Query_Resource_Conflict_List # setupapi.CM_Query_Resource_Conflict_List @ stdcall CM_Reenumerate_DevNode(long long) setupapi.CM_Reenumerate_DevNode @ stdcall CM_Reenumerate_DevNode_Ex(long long long) setuapi.CM_Reenumerate_DevNode_Ex @ stub CM_Register_Device_Driver # setupapi.CM_Register_Device_Driver @@ -158,16 +167,14 @@ @ stub CM_Register_Device_Interface_ExW # setupapi.CM_Register_Device_Interface_ExW @ stub CM_Remove_SubTree # setupapi.CM_Remove_SubTree @ stub CM_Remove_SubTree_Ex # setupapi.CM_Remove_SubTree_Ex -@ stub CM_Remove_Unmarked_Children # setupapi.CM_Remove_Unmarked_Children -@ stub CM_Remove_Unmarked_Children_Ex # setupapi.CM_Remove_Unmarked_Children_Ex @ stub CM_Request_Device_EjectA # setupapi.CM_Request_Device_EjectA @ stub CM_Request_Device_EjectW # setupapi.CM_Request_Device_EjectW @ stdcall CM_Request_Eject_PC() setupapi.CM_Request_Eject_PC @ stdcall CM_Request_Eject_PC_Ex(long) setupapi.CM_Request_Eject_PC_Ex -@ stub CM_Reset_Children_Marks # setupapi.CM_Reset_Children_Marks -@ stub CM_Reset_Children_Marks_Ex # setupapi.CM_Reset_Children_Marks_Ex @ stdcall CM_Run_Detection(long) setupapi.CM_Run_Detection @ stdcall CM_Run_Detection_Ex(long long) setupapi.CM_Run_Detection_Ex +@ stub CM_Set_Class_Registry_PropertyA # setupapi.CM_Set_Class_Registry_PropertyA +@ stub CM_Set_Class_Registry_PropertyW # setupapi.CM_Set_Class_Registry_PropertyW @ stdcall CM_Set_DevNode_Problem(long long long) setupapi.CM_Set_DevNode_Problem @ stdcall CM_Set_DevNode_Problem_Ex(long long long long) setupapi.CM_Set_DevNode_Problem_Ex @ stdcall CM_Set_DevNode_Registry_PropertyA(long long ptr long long) setupapi.CM_Set_DevNode_Registry_PropertyA @@ -189,3 +196,9 @@ @ stub CM_Unregister_Device_InterfaceW # setupapi.CM_Unregister_Device_InterfaceW @ stub CM_Unregister_Device_Interface_ExA # setupapi.CM_Unregister_Device_Interface_ExA @ stub CM_Unregister_Device_Interface_ExW # setupapi.CM_Unregister_Device_Interface_ExW + +# Deprecated functions, they are not present in Win2003 SP1 +@ stub CM_Remove_Unmarked_Children # setupapi.CM_Remove_Unmarked_Children +@ stub CM_Remove_Unmarked_Children_Ex # setupapi.CM_Remove_Unmarked_Children_Ex +@ stub CM_Reset_Children_Marks # setupapi.CM_Reset_Children_Marks +@ stub CM_Reset_Children_Marks_Ex # setupapi.CM_Reset_Children_Marks_Ex
13 years, 10 months
1
0
0
0
[pschweitzer] 50681: [KMTEST] Some more tests to FsRtlIsNameInExpression & FsRtlIsDbcsInExpression. Some are failing.
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Sun Feb 13 09:43:01 2011 New Revision: 50681 URL:
http://svn.reactos.org/svn/reactos?rev=50681&view=rev
Log: [KMTEST] Some more tests to FsRtlIsNameInExpression & FsRtlIsDbcsInExpression. Some are failing. Modified: trunk/rostests/drivers/kmtest/ntos_fsrtl.c Modified: trunk/rostests/drivers/kmtest/ntos_fsrtl.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/drivers/kmtest/ntos_fsrtl…
============================================================================== --- trunk/rostests/drivers/kmtest/ntos_fsrtl.c [iso-8859-1] (original) +++ trunk/rostests/drivers/kmtest/ntos_fsrtl.c [iso-8859-1] Sun Feb 13 09:43:01 2011 @@ -139,6 +139,8 @@ RtlInitUnicodeString(&Expression, L"*.c.d"); RtlInitUnicodeString(&Name, L"a.b.c.d"); ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); + RtlInitUnicodeString(&Expression, L"*.?.c.d"); + ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); RtlInitUnicodeString(&Expression, L"*?"); RtlInitUnicodeString(&Name, L""); ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE"); @@ -146,6 +148,8 @@ ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); RtlInitUnicodeString(&Name, L"aa"); ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); + RtlInitUnicodeString(&Name, L"aaa"); + ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); RtlInitUnicodeString(&Expression, L"?*?"); RtlInitUnicodeString(&Name, L""); ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE"); @@ -154,6 +158,8 @@ RtlInitUnicodeString(&Name, L"aa"); ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); RtlInitUnicodeString(&Name, L"aaa"); + ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); + RtlInitUnicodeString(&Name, L"aaaa"); ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); } @@ -267,6 +273,8 @@ RtlInitAnsiString(&Expression, "*.c.d"); RtlInitAnsiString(&Name, "a.b.c.d"); ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); + RtlInitAnsiString(&Expression, "*.?.c.d"); + ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); RtlInitAnsiString(&Expression, "*?"); RtlInitAnsiString(&Name, ""); ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE"); @@ -274,6 +282,8 @@ ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); RtlInitAnsiString(&Name, "aa"); ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); + RtlInitAnsiString(&Name, "aaa"); + ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); RtlInitAnsiString(&Expression, "?*?"); RtlInitAnsiString(&Name, ""); ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE"); @@ -282,6 +292,8 @@ RtlInitAnsiString(&Name, "aa"); ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); RtlInitAnsiString(&Name, "aaa"); + ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); + RtlInitAnsiString(&Name, "aaaa"); ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); }
13 years, 10 months
1
0
0
0
[pschweitzer] 50680: [NTOSKRNL] For both FsRtlIsNameInExpression & FsRtlIsDbcsInExpression: - Get back "useless checks" (tests show they weren't that useless) - Prevent code redundancy This fixes 4...
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Sun Feb 13 08:43:48 2011 New Revision: 50680 URL:
http://svn.reactos.org/svn/reactos?rev=50680&view=rev
Log: [NTOSKRNL] For both FsRtlIsNameInExpression & FsRtlIsDbcsInExpression: - Get back "useless checks" (tests show they weren't that useless) - Prevent code redundancy This fixes 4 failing kmtest tests added in r50679 Modified: trunk/reactos/ntoskrnl/fsrtl/dbcsname.c trunk/reactos/ntoskrnl/fsrtl/name.c Modified: trunk/reactos/ntoskrnl/fsrtl/dbcsname.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fsrtl/dbcsname.c?…
============================================================================== --- trunk/reactos/ntoskrnl/fsrtl/dbcsname.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/fsrtl/dbcsname.c [iso-8859-1] Sun Feb 13 08:43:48 2011 @@ -184,40 +184,37 @@ else if (Expression->Buffer[ExpressionPosition] == '*') { StarFound = ExpressionPosition++; - if (StarFound < (Expression->Length - 1)) + if (ExpressionPosition == Expression->Length) + { + NamePosition = Name->Length; + } + } + else if (Expression->Buffer[ExpressionPosition] == ANSI_DOS_STAR) + { + StarFound = MAXUSHORT; + MatchingChars = NamePosition; + while (MatchingChars < Name->Length) + { + if (Name->Buffer[MatchingChars] == '.') + { + NamePosition = MatchingChars; + } + MatchingChars++; + } + ExpressionPosition++; + } + else if (StarFound != MAXUSHORT) + { + ExpressionPosition = StarFound + 1; + if (Expression->Buffer[ExpressionPosition] != '*' && Expression->Buffer[ExpressionPosition] != '?' && + Expression->Buffer[ExpressionPosition] != ANSI_DOS_DOT && Expression->Buffer[ExpressionPosition] != ANSI_DOS_QM && + Expression->Buffer[ExpressionPosition] != ANSI_DOS_STAR) { while (Name->Buffer[NamePosition] != Expression->Buffer[ExpressionPosition] && NamePosition < Name->Length) { NamePosition++; } - } - else - { - NamePosition = Name->Length; - } - } - else if (Expression->Buffer[ExpressionPosition] == ANSI_DOS_STAR) - { - StarFound = MAXUSHORT; - MatchingChars = NamePosition; - while (MatchingChars < Name->Length) - { - if (Name->Buffer[MatchingChars] == '.') - { - NamePosition = MatchingChars; - } - MatchingChars++; - } - ExpressionPosition++; - } - else if (StarFound != MAXUSHORT) - { - ExpressionPosition = StarFound + 1; - while (Name->Buffer[NamePosition] != Expression->Buffer[ExpressionPosition] && - NamePosition < Name->Length) - { - NamePosition++; } } else Modified: trunk/reactos/ntoskrnl/fsrtl/name.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fsrtl/name.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/fsrtl/name.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/fsrtl/name.c [iso-8859-1] Sun Feb 13 08:43:48 2011 @@ -44,40 +44,37 @@ else if (Expression->Buffer[ExpressionPosition] == L'*') { StarFound = ExpressionPosition++; - if (StarFound < (Expression->Length / sizeof(WCHAR) - 1)) + if (ExpressionPosition == Expression->Length / sizeof(WCHAR)) + { + NamePosition = Name->Length / sizeof(WCHAR); + } + } + else if (Expression->Buffer[ExpressionPosition] == DOS_STAR) + { + StarFound = MAXUSHORT; + MatchingChars = NamePosition; + while (MatchingChars < Name->Length / sizeof(WCHAR)) + { + if (Name->Buffer[MatchingChars] == L'.') + { + NamePosition = MatchingChars; + } + MatchingChars++; + } + ExpressionPosition++; + } + else if (StarFound != MAXUSHORT) + { + ExpressionPosition = StarFound + 1; + if (Expression->Buffer[ExpressionPosition] != L'*' && Expression->Buffer[ExpressionPosition] != L'?' && + Expression->Buffer[ExpressionPosition] != DOS_DOT && Expression->Buffer[ExpressionPosition] != DOS_QM && + Expression->Buffer[ExpressionPosition] != DOS_STAR) { while ((IgnoreCase ? UpcaseTable[Name->Buffer[NamePosition]] : Name->Buffer[NamePosition]) != Expression->Buffer[ExpressionPosition] && NamePosition < Name->Length / sizeof(WCHAR)) { NamePosition++; } - } - else - { - NamePosition = Name->Length / sizeof(WCHAR); - } - } - else if (Expression->Buffer[ExpressionPosition] == DOS_STAR) - { - StarFound = MAXUSHORT; - MatchingChars = NamePosition; - while (MatchingChars < Name->Length / sizeof(WCHAR)) - { - if (Name->Buffer[MatchingChars] == L'.') - { - NamePosition = MatchingChars; - } - MatchingChars++; - } - ExpressionPosition++; - } - else if (StarFound != MAXUSHORT) - { - ExpressionPosition = StarFound + 1; - while ((IgnoreCase ? UpcaseTable[Name->Buffer[NamePosition]] : Name->Buffer[NamePosition]) != Expression->Buffer[ExpressionPosition] && - NamePosition < Name->Length / sizeof(WCHAR)) - { - NamePosition++; } } else
13 years, 10 months
1
0
0
0
[pschweitzer] 50679: [KMTEST] Some more tests to FsRtlIsNameInExpression & FsRtlIsDbcsInExpression. Some are failing.
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Sun Feb 13 08:19:16 2011 New Revision: 50679 URL:
http://svn.reactos.org/svn/reactos?rev=50679&view=rev
Log: [KMTEST] Some more tests to FsRtlIsNameInExpression & FsRtlIsDbcsInExpression. Some are failing. Modified: trunk/rostests/drivers/kmtest/ntos_fsrtl.c Modified: trunk/rostests/drivers/kmtest/ntos_fsrtl.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/drivers/kmtest/ntos_fsrtl…
============================================================================== --- trunk/rostests/drivers/kmtest/ntos_fsrtl.c [iso-8859-1] (original) +++ trunk/rostests/drivers/kmtest/ntos_fsrtl.c [iso-8859-1] Sun Feb 13 08:19:16 2011 @@ -139,6 +139,22 @@ RtlInitUnicodeString(&Expression, L"*.c.d"); RtlInitUnicodeString(&Name, L"a.b.c.d"); ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); + RtlInitUnicodeString(&Expression, L"*?"); + RtlInitUnicodeString(&Name, L""); + ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE"); + RtlInitUnicodeString(&Name, L"a"); + ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); + RtlInitUnicodeString(&Name, L"aa"); + ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); + RtlInitUnicodeString(&Expression, L"?*?"); + RtlInitUnicodeString(&Name, L""); + ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE"); + RtlInitUnicodeString(&Name, L"a"); + ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == FALSE, "expected FALSE, got TRUE"); + RtlInitUnicodeString(&Name, L"aa"); + ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); + RtlInitUnicodeString(&Name, L"aaa"); + ok(FsRtlIsNameInExpression(&Expression, &Name, FALSE, NULL) == TRUE, "expected TRUE, got FALSE"); } VOID FsRtlIsDbcsInExpressionTest() @@ -250,6 +266,22 @@ RtlInitAnsiString(&Expression, "*.c.d"); RtlInitAnsiString(&Name, "a.b.c.d"); + ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); + RtlInitAnsiString(&Expression, "*?"); + RtlInitAnsiString(&Name, ""); + ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE"); + RtlInitAnsiString(&Name, "a"); + ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); + RtlInitAnsiString(&Name, "aa"); + ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); + RtlInitAnsiString(&Expression, "?*?"); + RtlInitAnsiString(&Name, ""); + ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE"); + RtlInitAnsiString(&Name, "a"); + ok(FsRtlIsDbcsInExpression(&Expression, &Name) == FALSE, "expected FALSE, got TRUE"); + RtlInitAnsiString(&Name, "aa"); + ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); + RtlInitAnsiString(&Name, "aaa"); ok(FsRtlIsDbcsInExpression(&Expression, &Name) == TRUE, "expected TRUE, got FALSE"); }
13 years, 10 months
1
0
0
0
[ekohl] 50678: [SETUPAPI] Add resource descriptor function stubs.
by ekohl@svn.reactos.org
Author: ekohl Date: Sat Feb 12 23:59:12 2011 New Revision: 50678 URL:
http://svn.reactos.org/svn/reactos?rev=50678&view=rev
Log: [SETUPAPI] Add resource descriptor function stubs. Modified: trunk/reactos/dll/win32/setupapi/cfgmgr.c trunk/reactos/dll/win32/setupapi/setupapi.spec Modified: trunk/reactos/dll/win32/setupapi/cfgmgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/cfgmgr.…
============================================================================== --- trunk/reactos/dll/win32/setupapi/cfgmgr.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/setupapi/cfgmgr.c [iso-8859-1] Sat Feb 12 23:59:12 2011 @@ -414,6 +414,34 @@ /*********************************************************************** + * CM_Add_Res_Des [SETUPAPI.@] + */ +CONFIGRET WINAPI CM_Add_Res_Des( + PRES_DES prdResDes, LOG_CONF lcLogConf, RESOURCEID ResourceID, + PCVOID ResourceData, ULONG ResourceLen, ULONG ulFlags) +{ + TRACE("%p %p %lu %p %lu %lx\n", prdResDes, lcLogConf, ResourceID, + ResourceData, ResourceLen, ulFlags); + return CM_Add_Res_Des_Ex(prdResDes, lcLogConf, ResourceID, ResourceData, + ResourceLen, ulFlags, NULL); +} + + +/*********************************************************************** + * CM_Add_Res_Des_Ex [SETUPAPI.@] + */ +CONFIGRET WINAPI CM_Add_Res_Des_Ex( + PRES_DES prdResDes, LOG_CONF lcLogConf, RESOURCEID ResourceID, + PCVOID ResourceData, ULONG ResourceLen, ULONG ulFlags, HMACHINE hMachine) +{ + FIXME("%p %p %lu %p %lu %lx %p\n", prdResDes, lcLogConf, ResourceID, + ResourceData, ResourceLen, ulFlags, hMachine); + + return CR_CALL_NOT_IMPLEMENTED; +} + + +/*********************************************************************** * CM_Connect_MachineA [SETUPAPI.@] */ CONFIGRET WINAPI CM_Connect_MachineA( @@ -1169,6 +1197,42 @@ HeapFree(GetProcessHeap(), 0, pLogConfInfo); return CR_SUCCESS; +} + + +/*********************************************************************** + * CM_Free_Res_Des [SETUPAPI.@] + */ +CONFIGRET WINAPI CM_Free_Res_Des( + PRES_DES prdResDes, RES_DES rdResDes, ULONG ulFlags) +{ + TRACE("%p %p %lx\n", prdResDes, rdResDes, ulFlags); + return CM_Free_Res_Des_Ex(prdResDes, rdResDes, ulFlags, NULL); +} + + +/*********************************************************************** + * CM_Free_Res_Des_Ex [SETUPAPI.@] + */ +CONFIGRET WINAPI CM_Free_Res_Des_Ex( + PRES_DES prdResDes, RES_DES rdResDes, ULONG ulFlags, + HMACHINE hMachine) +{ + FIXME("%p %p %lx %lx\n", prdResDes, rdResDes, ulFlags, hMachine); + + return CR_CALL_NOT_IMPLEMENTED; +} + + +/*********************************************************************** + * CM_Free_Res_Des_Handle [SETUPAPI.@] + */ +CONFIGRET WINAPI CM_Free_Res_Des_Handle( + RES_DES rdResDes) +{ + FIXME("%p\n", rdResDes); + + return CR_CALL_NOT_IMPLEMENTED; } @@ -2641,6 +2705,34 @@ /*********************************************************************** + * CM_Get_Next_Re_Des [SETUPAPI.@] + */ +CONFIGRET WINAPI CM_Get_Next_Res_Des( + PRES_DES prdResDes, RES_DES rdResDes, RESOURCEID ForResource, + PRESOURCEID pResourceID, ULONG ulFlags) +{ + TRACE("%p %p %lu %p %lx\n", prdResDes, rdResDes, ForResource, + pResourceID, ulFlags); + return CM_Get_Next_Res_Des_Ex(prdResDes, rdResDes, ForResource, + pResourceID, ulFlags, NULL); +} + + +/*********************************************************************** + * CM_Get_Next_Re_Des_Ex [SETUPAPI.@] + */ +CONFIGRET WINAPI CM_Get_Next_Res_Des_Ex( + PRES_DES prdResDes, RES_DES rdResDes, RESOURCEID ForResource, + PRESOURCEID pResourceID, ULONG ulFlags, HMACHINE hMachine) +{ + FIXME("%p %p %lu %p %lx %lx\n", prdResDes, rdResDes, ForResource, + pResourceID, ulFlags, hMachine); + + return CR_CALL_NOT_IMPLEMENTED; +} + + +/*********************************************************************** * CM_Get_Parent [SETUPAPI.@] */ CONFIGRET WINAPI CM_Get_Parent( @@ -2724,6 +2816,51 @@ *pdnDevInst = dwIndex; return CR_SUCCESS; +} + + +/*********************************************************************** + * CM_Get_Res_Des_Data [SETUPAPI.@] + */ +CONFIGRET WINAPI CM_Get_Res_Des_Data( + RES_DES rdResDes, PVOID Buffer, ULONG BufferLen, ULONG ulFlags) +{ + TRACE("%p %p %l %lx\n", rdResDes, Buffer, BufferLen, ulFlags); + return CM_Get_Res_Des_Data_Ex(rdResDes, Buffer, BufferLen, ulFlags, NULL); +} + + +/*********************************************************************** + * CM_Get_Res_Des_Data_Ex [SETUPAPI.@] + */ +CONFIGRET WINAPI CM_Get_Res_Des_Data_Ex( + RES_DES rdResDes, PVOID Buffer, ULONG BufferLen, ULONG ulFlags, + HMACHINE hMachine) +{ + FIXME("%p %p %l %lx %lx\n", rdResDes, Buffer, BufferLen, ulFlags, hMachine); + return CR_CALL_NOT_IMPLEMENTED; +} + + +/*********************************************************************** + * CM_Get_Res_Des_Size [SETUPAPI.@] + */ +CONFIGRET WINAPI CM_Get_Res_Des_Data_Size( + PULONG pulSize, RES_DES rdResDes, ULONG ulFlags) +{ + TRACE("%p %p %lx\n", pulSize, rdResDes, ulFlags); + return CM_Get_Res_Des_Data_Size_Ex(pulSize, rdResDes, ulFlags, NULL); +} + + +/*********************************************************************** + * CM_Get_Res_Des_Size_Ex [SETUPAPI.@] + */ +CONFIGRET WINAPI CM_Get_Res_Des_Data_Size_Ex( + PULONG pulSize, RES_DES rdResDes, ULONG ulFlags, HMACHINE hMachine) +{ + TRACE("%p %p %lx %lx\n", pulSize, rdResDes, ulFlags, hMachine); + return CR_CALL_NOT_IMPLEMENTED; } @@ -3101,6 +3238,33 @@ } return ret; +} + + +/*********************************************************************** + * CM_Modify_Res_Des [SETUPAPI.@] + */ +CONFIGRET WINAPI CM_Modify_Res_Des( + PRES_DES prdResDes, RES_DES rdResDes, RESOURCEID ResourceID, + PCVOID ResourceData, ULONG ResourceLen, ULONG ulFlags) +{ + TRACE("%p %p %lx %p %lu %lx", prdResDes, rdResDes, ResourceID, ResourceData, + ResourceLen, ulFlags); + return CM_Modify_Res_Des_Ex(prdResDes, rdResDes, ResourceID, ResourceData, + ResourceLen, ulFlags, NULL); +} + + +/*********************************************************************** + * CM_Modify_Res_Des_Ex [SETUPAPI.@] + */ +CONFIGRET WINAPI CM_Modify_Res_Des_Ex( + PRES_DES prdResDes, RES_DES rdResDes, RESOURCEID ResourceID, PCVOID ResourceData, + ULONG ResourceLen, ULONG ulFlags, HMACHINE hMachine) +{ + FIXME("%p %p %lx %p %lu %lx %lx", prdResDes, rdResDes, ResourceID, ResourceData, + ResourceLen, ulFlags, hMachine); + return CR_CALL_NOT_IMPLEMENTED; } Modified: trunk/reactos/dll/win32/setupapi/setupapi.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/setupap…
============================================================================== --- trunk/reactos/dll/win32/setupapi/setupapi.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/setupapi/setupapi.spec [iso-8859-1] Sat Feb 12 23:59:12 2011 @@ -14,8 +14,8 @@ @ stdcall CM_Add_ID_ExA(ptr str long ptr) @ stdcall CM_Add_ID_ExW(ptr wstr long ptr) @ stub CM_Add_Range -@ stub CM_Add_Res_Des -@ stub CM_Add_Res_Des_Ex +@ stdcall CM_Add_Res_Des(ptr ptr long ptr long long) +@ stdcall CM_Add_Res_Des_Ex(ptr ptr long ptr long long long) @ stdcall CM_Connect_MachineA(str ptr) @ stdcall CM_Connect_MachineW(wstr ptr) @ stdcall CM_Create_DevNodeA(ptr str long long) @@ -48,9 +48,9 @@ @ stdcall CM_Free_Log_Conf_Ex(ptr long ptr) @ stdcall CM_Free_Log_Conf_Handle(ptr) @ stub CM_Free_Range_List -@ stub CM_Free_Res_Des -@ stub CM_Free_Res_Des_Ex -@ stub CM_Free_Res_Des_Handle +@ stdcall CM_Free_Res_Des(ptr ptr long) +@ stdcall CM_Free_Res_Des_Ex(ptr ptr long long) +@ stdcall CM_Free_Res_Des_Handle(ptr) @ stub CM_Free_Resource_Conflict_Handle @ stdcall CM_Get_Child(ptr long long) @ stdcall CM_Get_Child_Ex(ptr long long long) @@ -118,14 +118,14 @@ @ stdcall CM_Get_Log_Conf_Priority_Ex(ptr ptr long long) @ stdcall CM_Get_Next_Log_Conf(ptr ptr long) @ stdcall CM_Get_Next_Log_Conf_Ex(ptr ptr long long) -@ stub CM_Get_Next_Res_Des -@ stub CM_Get_Next_Res_Des_Ex +@ stdcall CM_Get_Next_Res_Des(ptr ptr long ptr long) +@ stdcall CM_Get_Next_Res_Des_Ex(ptr ptr long ptr long long) @ stdcall CM_Get_Parent(ptr long long) @ stdcall CM_Get_Parent_Ex(ptr long long long) -@ stub CM_Get_Res_Des_Data -@ stub CM_Get_Res_Des_Data_Ex -@ stub CM_Get_Res_Des_Data_Size -@ stub CM_Get_Res_Des_Data_Size_Ex +@ stdcall CM_Get_Res_Des_Data(ptr ptr long long) +@ stdcall CM_Get_Res_Des_Data_Ex(ptr ptr long long long) +@ stdcall CM_Get_Res_Des_Data_Size(ptr ptr long) +@ stdcall CM_Get_Res_Des_Data_Size_Ex(ptr ptr long long) @ stub CM_Get_Resource_Conflict_Count @ stub CM_Get_Resource_Conflict_DetailsA @ stub CM_Get_Resource_Conflict_DetailsW @@ -144,8 +144,8 @@ @ stdcall CM_Locate_DevNode_ExA(ptr str long long) @ stdcall CM_Locate_DevNode_ExW(ptr wstr long long) @ stub CM_Merge_Range_List -@ stub CM_Modify_Res_Des -@ stub CM_Modify_Res_Des_Ex +@ stdcall CM_Modify_Res_Des(ptr ptr long ptr long long) +@ stdcall CM_Modify_Res_Des_Ex(ptr ptr long ptr long long long) @ stdcall CM_Move_DevNode(long long long) @ stdcall CM_Move_DevNode_Ex(long long long long) @ stub CM_Next_Range
13 years, 10 months
1
0
0
0
[pschweitzer] 50677: Remove some artifact from ARM build. Would it fix build?
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Sat Feb 12 20:32:49 2011 New Revision: 50677 URL:
http://svn.reactos.org/svn/reactos?rev=50677&view=rev
Log: Remove some artifact from ARM build. Would it fix build? Modified: trunk/reactos/ReactOS-arm.rbuild Modified: trunk/reactos/ReactOS-arm.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ReactOS-arm.rbuild?rev=506…
============================================================================== --- trunk/reactos/ReactOS-arm.rbuild [iso-8859-1] (original) +++ trunk/reactos/ReactOS-arm.rbuild [iso-8859-1] Sat Feb 12 20:32:49 2011 @@ -104,9 +104,6 @@ <xi:include href="lib/sdk/wdmguid/wdmguid.rbuild" /> </directory> </directory> - <directory name="ntdllsys"> - <xi:include href="lib/ntdllsys/ntdllsys.rbuild" /> - </directory> <directory name="smlib"> <xi:include href="lib/smlib/smlib.rbuild" /> </directory>
13 years, 10 months
1
0
0
0
← Newer
1
...
23
24
25
26
27
28
29
...
36
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
Results per page:
10
25
50
100
200