MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / EfiLibOpenRoot

Function EfiLibOpenRoot

rEFIt_UEFI/libeg/BmLib.cpp:57–90  ·  view source on GitHub ↗

Function opens and returns a file handle to the root directory of a volume. @param DeviceHandle A handle for a device @return A valid file handle or NULL is returned **/

Source from the content-addressed store, hash-verified

55
56**/
57EFI_FILE_HANDLE
58EfiLibOpenRoot (
59 IN EFI_HANDLE DeviceHandle
60 )
61{
62 EFI_STATUS Status;
63 EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *Volume;
64 EFI_FILE_HANDLE File;
65
66 File = NULL;
67
68 //
69 // File the file system interface to the device
70 //
71 Status = gBS->HandleProtocol (
72 DeviceHandle,
73 &gEfiSimpleFileSystemProtocolGuid,
74 (VOID **) &Volume
75 );
76
77 //
78 // Open the root directory of the volume
79 //
80 if (!EFI_ERROR(Status)) {
81 Status = Volume->OpenVolume (
82 Volume,
83 &File
84 );
85 }
86 //
87 // Done
88 //
89 return EFI_ERROR(Status) ? NULL : File;
90}
91
92/**
93

Callers 7

egFindESPFunction · 0.70
GetRootFromPathFunction · 0.50
ReinitSelfLibFunction · 0.50
FinishInitRefitLibFunction · 0.50
ScanVolumeFunction · 0.50
ReinitVolumesFunction · 0.50
GetDebugLogFileFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected