]> git.proxmox.com Git - mirror_edk2.git/blame - FatPkg/EnhancedFatDxe/Debug.c
Fix a typo when checking the 16-bit alignment of Unicode String.
[mirror_edk2.git] / FatPkg / EnhancedFatDxe / Debug.c
CommitLineData
b9ec9330
QH
1/*++\r
2\r
3Copyright (c) 2005, Intel Corporation\r
4All rights reserved. This program and the accompanying materials are licensed and made available\r
5under the terms and conditions of the BSD License which accompanies this\r
6distribution. The full text of the license may be found at\r
7http://opensource.org/licenses/bsd-license.php\r
8\r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
11\r
12\r
13Module Name:\r
14\r
15 debug.c\r
16\r
17Abstract:\r
18\r
19 Debug functions for fat driver\r
20\r
21Revision History\r
22\r
23--*/\r
24\r
25#include "Fat.h"\r
26\r
27VOID\r
28FatDumpFatTable (\r
29 IN FAT_VOLUME *Volume\r
30 )\r
31/*++\r
32\r
33Routine Description:\r
34\r
35 Dump all the FAT Entry of the FAT table in the volume\r
36\r
37Arguments:\r
38\r
39 Volume - The volume whose FAT info will be dumped\r
40\r
41Returns:\r
42\r
43 None\r
44\r
45--*/\r
46{\r
47 UINTN EntryValue;\r
48 UINTN MaxIndex;\r
49 UINTN Index;\r
50 CHAR16 *Pointer;\r
51\r
52 MaxIndex = Volume->MaxCluster + 2;\r
53\r
54 Print (L"Dump of Fat Table, MaxCluster %x\n", MaxIndex);\r
55 for (Index = 0; Index < MaxIndex; Index++) {\r
56 EntryValue = FatGetFatEntry (Volume, Index);\r
57 if (EntryValue != FAT_CLUSTER_FREE) {\r
58 Pointer = NULL;\r
59 switch (EntryValue) {\r
60 case FAT_CLUSTER_RESERVED:\r
61 Pointer = L"RESREVED";\r
62 break;\r
63\r
64 case FAT_CLUSTER_BAD:\r
65 Pointer = L"BAD";\r
66 break;\r
67 }\r
68\r
69 if (FAT_END_OF_FAT_CHAIN (EntryValue)) {\r
70 Pointer = L"LAST";\r
71 }\r
72\r
73 if (Pointer != NULL) {\r
74 Print (L"Entry %x = %s\n", Index, Pointer);\r
75 } else {\r
76 Print (L"Entry %x = %x\n", Index, EntryValue);\r
77 }\r
78 }\r
79 }\r
80}\r