From 4f335ab6b0310981440e0559e1709e4b5ac9f45a Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Mon, 22 Nov 2010 21:38:23 +0000 Subject: [PATCH] [NTOSKRNL] - Add missing PAGED_CODE() where needed - Removed a wrong ASSERT in FsRtlIsNameInExpressionPrivate() and replace it by the right one - Mark FsRtlIsDbcsInExpression() as halfplemented svn path=/trunk/; revision=49711 --- reactos/ntoskrnl/fsrtl/dbcsname.c | 11 +++++++++-- reactos/ntoskrnl/fsrtl/name.c | 6 +++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/reactos/ntoskrnl/fsrtl/dbcsname.c b/reactos/ntoskrnl/fsrtl/dbcsname.c index 64359a50c01..da0fd71cb47 100644 --- a/reactos/ntoskrnl/fsrtl/dbcsname.c +++ b/reactos/ntoskrnl/fsrtl/dbcsname.c @@ -48,6 +48,7 @@ FsRtlDissectDbcs(IN ANSI_STRING Name, { ULONG FirstPosition, i; ULONG SkipFirstSlash = 0; + PAGED_CODE(); /* Zero the strings before continuing */ RtlZeroMemory(FirstPart, sizeof(ANSI_STRING)); @@ -116,6 +117,7 @@ NTAPI FsRtlDoesDbcsContainWildCards(IN PANSI_STRING Name) { ULONG i; + PAGED_CODE(); /* Check every character */ for (i = 0; i < Name->Length; i++) @@ -138,7 +140,7 @@ FsRtlDoesDbcsContainWildCards(IN PANSI_STRING Name) /*++ * @name FsRtlIsDbcsInExpression - * @implemented + * @halfplemented * * Check if the Name string is in the Expression string. * @@ -150,7 +152,7 @@ FsRtlDoesDbcsContainWildCards(IN PANSI_STRING Name) * * @return TRUE if Name is found in Expression, FALSE otherwise * - * @remarks None + * @remarks Implementation should be fixed to handle wildcards * *--*/ BOOLEAN @@ -159,7 +161,10 @@ FsRtlIsDbcsInExpression(IN PANSI_STRING Expression, IN PANSI_STRING Name) { ULONG ExpressionPosition, NamePosition, MatchingChars = 0; + PAGED_CODE(); + ASSERT(Name->Length); + ASSERT(Expression->Length); ASSERT(!FsRtlDoesDbcsContainWildCards(Name)); /* One can't be null, both can be */ @@ -242,6 +247,7 @@ FsRtlIsFatDbcsLegal(IN ANSI_STRING DbcsName, ANSI_STRING FirstPart, RemainingPart, Name; BOOLEAN LastDot; ULONG i; + PAGED_CODE(); /* Just quit if the string is empty */ if (!DbcsName.Length) @@ -378,6 +384,7 @@ FsRtlIsHpfsDbcsLegal(IN ANSI_STRING DbcsName, { ANSI_STRING FirstPart, RemainingPart, Name; ULONG i; + PAGED_CODE(); /* Just quit if the string is empty */ if (!DbcsName.Length) diff --git a/reactos/ntoskrnl/fsrtl/name.c b/reactos/ntoskrnl/fsrtl/name.c index 1405b9f99c4..291ecf7f12a 100644 --- a/reactos/ntoskrnl/fsrtl/name.c +++ b/reactos/ntoskrnl/fsrtl/name.c @@ -23,8 +23,9 @@ FsRtlIsNameInExpressionPrivate(IN PUNICODE_STRING Expression, IN PWCHAR UpcaseTable OPTIONAL) { ULONG i = 0, j, k = 0; + PAGED_CODE(); - ASSERT(!FsRtlDoesNameContainWildCards(Name)); + ASSERT(!IgnoreCase || UpcaseTable); while (i < Name->Length / sizeof(WCHAR) && k < Expression->Length / sizeof(WCHAR)) { @@ -119,6 +120,7 @@ FsRtlAreNamesEqual(IN PCUNICODE_STRING Name1, BOOLEAN StringsAreEqual, MemoryAllocated = FALSE; ULONG i; NTSTATUS Status; + PAGED_CODE(); /* Well, first check their size */ if (Name1->Length != Name2->Length) return FALSE; @@ -210,6 +212,7 @@ FsRtlDissectName(IN UNICODE_STRING Name, { ULONG FirstPosition, i; ULONG SkipFirstSlash = 0; + PAGED_CODE(); /* Zero the strings before continuing */ RtlZeroMemory(FirstPart, sizeof(UNICODE_STRING)); @@ -272,6 +275,7 @@ NTAPI FsRtlDoesNameContainWildCards(IN PUNICODE_STRING Name) { PWCHAR Ptr; + PAGED_CODE(); /* Loop through every character */ if (Name->Length)