summaryrefslogtreecommitdiffstats
path: root/FatPkg/EnhancedFatDxe/DirectoryCache.c
diff options
context:
space:
mode:
authorMichael Kubacki <michael.kubacki@microsoft.com>2021-12-05 14:53:58 -0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-12-07 17:24:28 +0000
commitbcdcc4160d7460c46c08c9395aae81be44ef23a9 (patch)
tree8e8607b86b86a1cebeaf6f614c43731a486b61a5 /FatPkg/EnhancedFatDxe/DirectoryCache.c
parenta550d468a6ca577d9e9c57a0eafcf2fc9fbb8c97 (diff)
downloadedk2-bcdcc4160d7460c46c08c9395aae81be44ef23a9.tar.gz
edk2-bcdcc4160d7460c46c08c9395aae81be44ef23a9.tar.bz2
edk2-bcdcc4160d7460c46c08c9395aae81be44ef23a9.zip
FatPkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the FatPkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
Diffstat (limited to 'FatPkg/EnhancedFatDxe/DirectoryCache.c')
-rw-r--r--FatPkg/EnhancedFatDxe/DirectoryCache.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/FatPkg/EnhancedFatDxe/DirectoryCache.c b/FatPkg/EnhancedFatDxe/DirectoryCache.c
index 2333016d13..c8e5095771 100644
--- a/FatPkg/EnhancedFatDxe/DirectoryCache.c
+++ b/FatPkg/EnhancedFatDxe/DirectoryCache.c
@@ -19,7 +19,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
STATIC
VOID
FatFreeODir (
- IN FAT_ODIR *ODir
+ IN FAT_ODIR *ODir
)
{
FAT_DIRENT *DirEnt;
@@ -50,7 +50,7 @@ FatFreeODir (
STATIC
FAT_ODIR *
FatAllocateODir (
- IN FAT_OFILE *OFile
+ IN FAT_OFILE *OFile
)
{
FAT_ODIR *ODir;
@@ -78,14 +78,14 @@ FatAllocateODir (
**/
VOID
FatDiscardODir (
- IN FAT_OFILE *OFile
+ IN FAT_OFILE *OFile
)
{
FAT_ODIR *ODir;
FAT_VOLUME *Volume;
- Volume = OFile->Volume;
- ODir = OFile->ODir;
+ Volume = OFile->Volume;
+ ODir = OFile->ODir;
if (!OFile->DirEnt->Invalid) {
//
// If OFile does not represent a deleted file, then we will cache the directory
@@ -107,6 +107,7 @@ FatDiscardODir (
ODir = NULL;
}
}
+
//
// Release ODir Structure
//
@@ -127,14 +128,14 @@ FatDiscardODir (
**/
VOID
FatRequestODir (
- IN FAT_OFILE *OFile
+ IN FAT_OFILE *OFile
)
{
- UINTN DirCacheTag;
- FAT_VOLUME *Volume;
- FAT_ODIR *ODir;
- FAT_ODIR *CurrentODir;
- LIST_ENTRY *CurrentODirLink;
+ UINTN DirCacheTag;
+ FAT_VOLUME *Volume;
+ FAT_ODIR *ODir;
+ FAT_ODIR *CurrentODir;
+ LIST_ENTRY *CurrentODirLink;
Volume = OFile->Volume;
ODir = NULL;
@@ -142,7 +143,8 @@ FatRequestODir (
for (CurrentODirLink = Volume->DirCacheList.ForwardLink;
CurrentODirLink != &Volume->DirCacheList;
CurrentODirLink = CurrentODirLink->ForwardLink
- ) {
+ )
+ {
CurrentODir = ODIR_FROM_DIRCACHELINK (CurrentODirLink);
if (CurrentODir->DirCacheTag == DirCacheTag) {
RemoveEntryList (&CurrentODir->DirCacheLink);
@@ -171,10 +173,11 @@ FatRequestODir (
**/
VOID
FatCleanupODirCache (
- IN FAT_VOLUME *Volume
+ IN FAT_VOLUME *Volume
)
{
FAT_ODIR *ODir;
+
while (Volume->DirCacheCount > 0) {
ODir = ODIR_FROM_DIRCACHELINK (Volume->DirCacheList.BackLink);
RemoveEntryList (&ODir->DirCacheLink);