15#define MAX_LINE_LENGTH 512
40 CHAR8 Entry[MAX_LINE_LENGTH];
50 if (Context ==
NULL) {
51 return EFI_INVALID_PARAMETER;
63 if (EFI_ERROR (Status) || (Num == 0)) {
64 DEBUG ((DEBUG_ERROR,
"NumOfRecovery not found\n"));
69 ConfigHeader->NumOfRecovery = Num;
71 if (*RecoveryArray ==
NULL) {
73 return EFI_OUT_OF_RESOURCES;
76 for (Index = 0; Index < ConfigHeader->NumOfRecovery; Index++) {
94 if (EFI_ERROR (Status) || (SectionName ==
NULL)) {
95 DEBUG ((DEBUG_ERROR,
"[%d] %a not found\n", Index, Entry));
114 if (EFI_ERROR (Status)) {
116 DEBUG ((DEBUG_ERROR,
"[%d] FileGuid not found\n", Index));
117 return EFI_NOT_FOUND;
120 CopyGuid (&((*RecoveryArray)[Index].FileGuid), &FileGuid);
131 if (EFI_ERROR (Status)) {
133 DEBUG ((DEBUG_ERROR,
"[%d] Length not found\n", Index));
134 return EFI_NOT_FOUND;
137 (*RecoveryArray)[Index].Length = Num;
148 if (EFI_ERROR (Status)) {
150 DEBUG ((DEBUG_ERROR,
"[%d] ImageOffset not found\n", Index));
151 return EFI_NOT_FOUND;
154 (*RecoveryArray)[Index].ImageOffset = Num;
UINTN EFIAPI AsciiStrnLenS(IN CONST CHAR8 *String, IN UINTN MaxSize)
RETURN_STATUS EFIAPI AsciiStrCpyS(OUT CHAR8 *Destination, IN UINTN DestMax, IN CONST CHAR8 *Source)
GUID *EFIAPI CopyGuid(OUT GUID *DestinationGuid, IN CONST GUID *SourceGuid)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI CloseIniFile(IN VOID *Context)
EFI_STATUS EFIAPI GetStringFromDataFile(IN VOID *Context, IN CHAR8 *SectionName, IN CHAR8 *EntryName, OUT CHAR8 **EntryValue)
EFI_STATUS EFIAPI GetGuidFromDataFile(IN VOID *Context, IN CHAR8 *SectionName, IN CHAR8 *EntryName, OUT EFI_GUID *Guid)
EFI_STATUS EFIAPI GetHexUintnFromDataFile(IN VOID *Context, IN CHAR8 *SectionName, IN CHAR8 *EntryName, OUT UINTN *Data)
VOID *EFIAPI OpenIniFile(IN UINT8 *DataBuffer, IN UINTN BufferSize)
EFI_STATUS EFIAPI GetDecimalUintnFromDataFile(IN VOID *Context, IN CHAR8 *SectionName, IN CHAR8 *EntryName, OUT UINTN *Data)
RETURN_STATUS EFIAPI AsciiValueToStringS(IN OUT CHAR8 *Buffer, IN UINTN BufferSize, IN UINTN Flags, IN INT64 Value, IN UINTN Width)
#define DEBUG(Expression)
EFI_STATUS ParseRecoveryDataFile(IN UINT8 *DataBuffer, IN UINTN BufferSize, IN OUT CONFIG_HEADER *ConfigHeader, IN OUT RECOVERY_CONFIG_DATA **RecoveryArray)