X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=FatPkg%2FEnhancedFatDxe%2FDirectoryCache.c;h=30de86a996a1e13b72bd4a737b68925ef78b65d2;hb=0130fddeb32f2a91f8d3d81cd943f561a5719e50;hp=568b29178bd101e7d97f34c4fedbc36f9e7a2207;hpb=2777ed7068f0ce186761f5cfef8a0c2252e3e2a5;p=mirror_edk2.git diff --git a/FatPkg/EnhancedFatDxe/DirectoryCache.c b/FatPkg/EnhancedFatDxe/DirectoryCache.c index 568b29178b..30de86a996 100644 --- a/FatPkg/EnhancedFatDxe/DirectoryCache.c +++ b/FatPkg/EnhancedFatDxe/DirectoryCache.c @@ -1,4 +1,5 @@ -/*++ +/** @file + Functions for directory cache operation. Copyright (c) 2005, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available @@ -10,40 +11,22 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -Module Name: +**/ - DirectoryCache.c - -Abstract: - - Functions for directory cache operation +#include "Fat.h" -Revision History +/** ---*/ + Free the directory structure and release the memory. -#include "Fat.h" + @param ODir - The directory to be freed. +**/ STATIC VOID FatFreeODir ( IN FAT_ODIR *ODir ) -/*++ - -Routine Description: - - Free the directory structure and release the memory. - -Arguments: - - ODir - The directory to be freed. - -Returns: - - None. - ---*/ { FAT_DIRENT *DirEnt; @@ -63,26 +46,18 @@ Returns: FreePool (ODir); } +/** + + Allocate the directory structure. + + @param OFile - The corresponding OFile. + +**/ STATIC FAT_ODIR * FatAllocateODir ( IN FAT_OFILE *OFile ) -/*++ - -Routine Description: - - Allocate the directory structure. - -Arguments: - - OFile - The corresponding OFile. - -Returns: - - None. - ---*/ { FAT_ODIR *ODir; @@ -99,26 +74,18 @@ Returns: return ODir; } -VOID -FatDiscardODir ( - IN FAT_OFILE *OFile - ) -/*++ - -Routine Description: +/** Discard the directory structure when an OFile will be freed. Volume will cache this directory if the OFile does not represent a deleted file. -Arguments: + @param OFile - The OFile whose directory structure is to be discarded. - OFile - The OFile whose directory structure is to be discarded. - -Returns: - - None. - ---*/ +**/ +VOID +FatDiscardODir ( + IN FAT_OFILE *OFile + ) { FAT_ODIR *ODir; FAT_VOLUME *Volume; @@ -154,27 +121,20 @@ Returns: } } -VOID -FatRequestODir ( - IN FAT_OFILE *OFile - ) -/*++ +/** -Routine Description: Request the directory structure when an OFile is newly generated. If the directory structure is cached by volume, then just return this directory; Otherwise, allocate a new one for OFile. -Arguments: - - OFile - The OFile which requests directory structure. + @param OFile - The OFile which requests directory structure. -Returns: - - None. - ---*/ +**/ +VOID +FatRequestODir ( + IN FAT_OFILE *OFile + ) { UINTN DirCacheTag; FAT_VOLUME *Volume; @@ -208,25 +168,17 @@ Returns: OFile->ODir = ODir; } -VOID -FatCleanupODirCache ( - IN FAT_VOLUME *Volume - ) -/*++ - -Routine Description: +/** Clean up all the cached directory structures when the volume is going to be abandoned. -Arguments: + @param Volume - FAT file system volume. - Volume - FAT file system volume. - -Returns: - - None. - ---*/ +**/ +VOID +FatCleanupODirCache ( + IN FAT_VOLUME *Volume + ) { FAT_ODIR *ODir; while (Volume->DirCacheCount > 0) {