X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FCore%2FDxe%2FFwVol%2FFwVolRead.c;h=94ba5018969c4542bfbbc9d75f933ce4573edf91;hp=ff2fcb8023edbe614c3a8f9dac934f413114edca;hb=26fa3b49686805c5cb4e3f379b696c54a51088e0;hpb=28a00297189c323096aae8e2975de94e8549613c diff --git a/MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c b/MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c index ff2fcb8023..94ba501896 100644 --- a/MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c +++ b/MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c @@ -70,12 +70,12 @@ FfsAttributes2FvFileAttributes ( EFI_STATUS EFIAPI FvGetNextFile ( - IN EFI_FIRMWARE_VOLUME_PROTOCOL *This, - IN OUT VOID *Key, - IN OUT EFI_FV_FILETYPE *FileType, + IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This, + IN OUT VOID *Key, + IN OUT EFI_FV_FILETYPE *FileType, OUT EFI_GUID *NameGuid, OUT EFI_FV_FILE_ATTRIBUTES *Attributes, - OUT UINTN *Size + OUT UINTN *Size ) /*++ @@ -140,7 +140,7 @@ Returns: // // Check if read operation is enabled // - if ((FvAttributes & EFI_FV_READ_STATUS) == 0) { + if ((FvAttributes & EFI_FV2_READ_STATUS) == 0) { return EFI_ACCESS_DENIED; } @@ -148,7 +148,7 @@ Returns: // // File type needs to be in 0 - 0x0B // - return EFI_INVALID_PARAMETER; + return EFI_NOT_FOUND; } KeyValue = (UINTN *)Key; @@ -220,13 +220,6 @@ Returns: // *Size = FileLength - sizeof(EFI_FFS_FILE_HEADER); - if (FfsFileHeader->Attributes & FFS_ATTRIB_TAIL_PRESENT) { - // - // If tail is present substract it's size; - // - *Size -= sizeof(EFI_FFS_FILE_TAIL); - } - return EFI_SUCCESS; } @@ -234,13 +227,13 @@ Returns: EFI_STATUS EFIAPI FvReadFile ( - IN EFI_FIRMWARE_VOLUME_PROTOCOL *This, - IN EFI_GUID *NameGuid, - IN OUT VOID **Buffer, - IN OUT UINTN *BufferSize, - OUT EFI_FV_FILETYPE *FoundType, - OUT EFI_FV_FILE_ATTRIBUTES *FileAttributes, - OUT UINT32 *AuthenticationStatus + IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This, + IN CONST EFI_GUID *NameGuid, + IN OUT VOID **Buffer, + IN OUT UINTN *BufferSize, + OUT EFI_FV_FILETYPE *FoundType, + OUT EFI_FV_FILE_ATTRIBUTES *FileAttributes, + OUT UINT32 *AuthenticationStatus ) /*++ @@ -377,13 +370,13 @@ Returns: EFI_STATUS EFIAPI FvReadFileSection ( - IN EFI_FIRMWARE_VOLUME_PROTOCOL *This, - IN EFI_GUID *NameGuid, - IN EFI_SECTION_TYPE SectionType, - IN UINTN SectionInstance, - IN OUT VOID **Buffer, - IN OUT UINTN *BufferSize, - OUT UINT32 *AuthenticationStatus + IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This, + IN CONST EFI_GUID *NameGuid, + IN EFI_SECTION_TYPE SectionType, + IN UINTN SectionInstance, + IN OUT VOID **Buffer, + IN OUT UINTN *BufferSize, + OUT UINT32 *AuthenticationStatus ) /*++