Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync LZMA library with UEFITool #125

Merged
merged 2 commits into from
Feb 2, 2024
Merged

Conversation

yeggor
Copy link
Contributor

@yeggor yeggor commented Feb 1, 2024

Hi, I've been trying to figure out why the 0393d0c4-6b0c-4b96-b4c3-8c7eb718f348 file won't decompress (see #124 and #123).

It turned out to be due to using an outdated version of LZMA in uefi-firmware-parser.
In this PR, I synchronised the LZMA library with the version used in UEFITool and made the following changes to make it compatible:

diff --color uefi_firmware/compression/LZMA/LzmaCompress.c ../UEFITool/common/LZMA/LzmaCompress.c
61c61
< EFI_STATUS
---
> USTATUS
diff --color uefi_firmware/compression/LZMA/LzmaCompress.h ../UEFITool/common/LZMA/LzmaCompress.h
18c18
< #include "BaseTypes.h"
---
> #include "../basetypes.h"
27c27
<     EFI_STATUS
---
>     USTATUS
diff --color uefi_firmware/compression/LZMA/LzmaDecompress.c ../UEFITool/common/LZMA/LzmaDecompress.c
88c88
< EFI_STATUS
---
> USTATUS
104c104
<         return EFI_SUCCESS;
---
>         return U_SUCCESS;
107c107
<         return EFI_INVALID_PARAMETER;
---
>         return U_INVALID_PARAMETER;
130c130
< EFI_STATUS
---
> USTATUS
159c159
<         return EFI_SUCCESS;
---
>         return U_SUCCESS;
162c162
<         return EFI_INVALID_PARAMETER;
---
>         return U_INVALID_PARAMETER;
diff --color uefi_firmware/compression/LZMA/LzmaDecompress.h ../UEFITool/common/LZMA/LzmaDecompress.h
17c17
< #include "BaseTypes.h"
---
> #include "../basetypes.h"
54c54
<     EFI_STATUS
---
>     USTATUS
81c81
<     EFI_STATUS
---
>     USTATUS
Common subdirectories: uefi_firmware/compression/LZMA/SDK and ../UEFITool/common/LZMA/SDK
diff --color uefi_firmware/compression/LZMA/UefiLzma.h ../UEFITool/common/LZMA/UefiLzma.h
17c17
< #include "BaseTypes.h"
---
> #include "../basetypes.h"

@theopolis theopolis merged commit f4b0ff7 into theopolis:master Feb 2, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants