TianoCore EDK2 master
Loading...
Searching...
No Matches
OpenVolume.c
Go to the documentation of this file.
1
9#include "Fat.h"
10
24EFIAPI
28 )
29{
30 EFI_STATUS Status;
31 FAT_VOLUME *Volume;
32 FAT_IFILE *IFile;
33
34 Volume = VOLUME_FROM_VOL_INTERFACE (This);
36
37 //
38 // Open Root file
39 //
40 Status = FatOpenDirEnt (NULL, &Volume->RootDirEnt);
41 if (EFI_ERROR (Status)) {
42 goto Done;
43 }
44
45 //
46 // Open a new instance to the root
47 //
48 Status = FatAllocateIFile (Volume->Root, &IFile);
49 if (!EFI_ERROR (Status)) {
50 *File = &IFile->Handle;
51 }
52
53Done:
54
55 Status = FatCleanupVolume (Volume, Volume->Root, Status, NULL);
57
58 return Status;
59}
EFI_STATUS FatOpenDirEnt(IN FAT_OFILE *Parent, IN FAT_DIRENT *DirEnt)
EFI_STATUS FatAllocateIFile(IN FAT_OFILE *OFile, OUT FAT_IFILE **PtrIFile)
Definition: Open.c:24
VOID FatAcquireLock(VOID)
Definition: Misc.c:395
VOID FatReleaseLock(VOID)
Definition: Misc.c:426
EFI_STATUS FatCleanupVolume(IN FAT_VOLUME *Volume, IN FAT_OFILE *OFile, IN EFI_STATUS EfiStatus, IN FAT_TASK *Task)
Definition: Flush.c:382
#define NULL
Definition: Base.h:319
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
EFI_STATUS EFIAPI FatOpenVolume(IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *This, OUT EFI_FILE_PROTOCOL **File)
Definition: OpenVolume.c:25
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
Definition: Fat.h:217