191{
196 slot * longNameEntry;
198
199 UCHAR CheckSum, shortCheckSum;
203
205
208
211
214 {
216 }
217
219 {
220 if (*pContext !=
NULL)
221 {
223 }
224
226 {
229 }
230
232 {
234 }
236 {
239 }
241 }
242
244 longNameEntry = (
slot*) fatDirEntry;
245 dirMap = 0;
246
248 {
249
250
251
257 {
260
262 {
265
267 {
270 }
271
273 {
275 }
277 {
280 }
282
284 longNameEntry = (
slot*) fatDirEntry;
285 }
286 else
287 {
288 fatDirEntry--;
289 longNameEntry--;
290 }
291 }
292
295 {
297
299 {
302
304 {
307 }
308
310 {
312 }
314 {
317 }
319
321 longNameEntry = (
slot*) *pPage;
322 }
323 else
324 {
325 fatDirEntry++;
326 longNameEntry++;
327 }
328 }
329 }
330
332 CheckSum = 0;
333
335 {
337 {
341 }
342
344 {
345 dirMap = 0;
348 }
349 else
350 {
352 {
353 if (dirMap == 0)
354 {
359 }
360
361 DPRINT(
" name chunk1:[%.*S] chunk2:[%.*S] chunk3:[%.*S]\n",
365
366 index = longNameEntry->
id & 0x3f;
367
368
369
372 {
374 dirMap |= 1 <<
index;
375
380
381 if (longNameEntry->
id & 0x40)
382 {
383
385 }
386 }
387 else
388 DPRINT1(
"Long name entry has invalid index: %x!\n", longNameEntry->
id);
389
391
393 {
394 DPRINT1(
"Found wrong alias checksum in long name entry (first %x, current %x, %S)\n",
397 }
398 }
399 else
400 {
401 shortCheckSum = 0;
402 for (
i = 0;
i < 11;
i++)
403 {
404 shortCheckSum = (((shortCheckSum & 1) << 7)
405 | ((shortCheckSum & 0xfe) >> 1))
407 }
408
409 if (shortCheckSum != CheckSum &&
DirContext->LongNameU.Buffer[0])
410 {
411 DPRINT1(
"Checksum from long and short name is not equal (short: %x, long: %x, %S)\n",
412 shortCheckSum, CheckSum,
DirContext->LongNameU.Buffer);
414 }
415
417 {
419 }
420
422 break;
423 }
424 }
425
427
429 {
432
434 {
437 }
438
440 {
442 }
444 {
447 }
449
451 longNameEntry = (
slot*) *pPage;
452 }
453 else
454 {
455 fatDirEntry++;
456 longNameEntry++;
457 }
458 }
459
460
464
465
467
468
471
473}
_In_ PFCB _In_ LONGLONG FileOffset
_In_ PFCB _In_ PDIRENT_ENUM_CONTEXT DirContext
NTSTATUS vfatFCBInitializeCacheFromVolume(PVCB vcb, PVFATFCB fcb)
#define NT_SUCCESS(StatCode)
VOID vfat8Dot3ToString(PFAT_DIR_ENTRY pEntry, PUNICODE_STRING NameU)
#define ROUND_DOWN(n, align)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define EXCEPTION_EXECUTE_HANDLER
NTSYSAPI VOID NTAPI RtlCopyUnicodeString(PUNICODE_STRING DestinationString, PUNICODE_STRING SourceString)
#define STATUS_NO_MORE_ENTRIES
VOID NTAPI CcUnpinData(IN PVOID Bcb)
BOOLEAN NTAPI CcMapData(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN ULONG Flags, OUT PVOID *BcbResult, OUT PVOID *Buffer)
#define _SEH2_EXCEPT(...)
#define _SEH2_YIELD(__stmt)
unsigned char ShortName[11]
FSRTL_COMMON_FCB_HEADER RFCB
unsigned char alias_checksum
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
struct _LARGE_INTEGER::@2306 u
struct _FATDirEntry * PFAT_DIR_ENTRY
#define FAT_ENTRY_DELETED(DirEntry)
#define FAT_ENTRY_LONG(DirEntry)
#define FAT_ENTRY_END(DirEntry)
#define FAT_ENTRIES_PER_PAGE
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList