2 * PROJECT: ReactOS Kernel
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: ntoskrnl/fsrtl/name.c
5 * PURPOSE: Provides DBCS parsing and other support routines for FSDs
6 * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
9 /* INCLUDES ******************************************************************/
15 /* PUBLIC FUNCTIONS **********************************************************/
18 * @name FsRtlDissectDbcs
21 * Dissects a given path name into first and remaining part.
24 * ANSI string to dissect.
27 * Pointer to user supplied ANSI_STRING, that will later point
28 * to the first part of the original name.
30 * @param RemainingPart
31 * Pointer to user supplied ANSI_STRING, that will later point
32 * to the remaining part of the original name.
37 * Name: \test1\test2\test3
39 * RemainingPart: test2\test3
44 FsRtlDissectDbcs(IN ANSI_STRING Name
,
45 OUT PANSI_STRING FirstPart
,
46 OUT PANSI_STRING RemainingPart
)
48 KeBugCheck(FILE_SYSTEM
);
52 * @name FsRtlDoesDbcsContainWildCards
67 FsRtlDoesDbcsContainWildCards(IN PANSI_STRING Name
)
71 /* Check every character */
72 for (i
= 0; i
< Name
->Length
; i
++)
74 /* First make sure it's not the Lead DBCS */
75 if (FsRtlIsLeadDbcsCharacter(Name
->Buffer
[i
]))
79 else if (FsRtlIsAnsiCharacterWild(Name
->Buffer
[i
]))
81 /* Now return if it has a wildcard */
86 /* We didn't return above...so none found */
91 * @name FsRtlIsDbcsInExpression
109 FsRtlIsDbcsInExpression(IN PANSI_STRING Expression
,
110 IN PANSI_STRING Name
)
112 KeBugCheck(FILE_SYSTEM
);
117 * @name FsRtlIsFatDbcsLegal
125 * @param WildCardsPermissible
128 * @param PathNamePermissible
131 * @param LeadingBackslashPermissible
134 * @return TRUE if the DbcsName is legal, FALSE otherwise
141 FsRtlIsFatDbcsLegal(IN ANSI_STRING DbcsName
,
142 IN BOOLEAN WildCardsPermissible
,
143 IN BOOLEAN PathNamePermissible
,
144 IN BOOLEAN LeadingBackslashPermissible
)
146 KeBugCheck(FILE_SYSTEM
);
151 * @name FsRtlIsHpfsDbcsLegal
159 * @param WildCardsPermissible
162 * @param PathNamePermissible
165 * @param LeadingBackslashPermissible
168 * @return TRUE if the DbcsName is legal, FALSE otherwise
175 FsRtlIsHpfsDbcsLegal(IN ANSI_STRING DbcsName
,
176 IN BOOLEAN WildCardsPermissible
,
177 IN BOOLEAN PathNamePermissible
,
178 IN BOOLEAN LeadingBackslashPermissible
)
180 KeBugCheck(FILE_SYSTEM
);