From: Zbigniew Jędrzejewski-Szmek Date: Mon, 18 Aug 2025 19:42:10 +0000 (+0200) Subject: ukify: extend error message when section is too small X-Git-Tag: v258-rc3~9^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dbd7b16819ce6e0d7b9a17cb08d42c0c94a2b441;p=thirdparty%2Fsystemd.git ukify: extend error message when section is too small --- diff --git a/src/ukify/ukify.py b/src/ukify/ukify.py index a09ea09f9ed..5cd902bd9db 100755 --- a/src/ukify/ukify.py +++ b/src/ukify/ukify.py @@ -1045,7 +1045,10 @@ def pe_add_sections(opts: UkifyConfig, uki: UKI, output: str) -> None: for i, s in enumerate(pe.sections[:n_original_sections]): if pe_strip_section_name(s.Name) == section.name and section.name != '.dtbauto': if new_section.Misc_VirtualSize > s.SizeOfRawData: - raise PEError(f'Not enough space in existing section {section.name} to append new data') + raise PEError( + f'Not enough space in existing section {section.name} to append new data' + f' (need {new_section.Misc_VirtualSize}, have {s.SizeOfRawData})' + ) padding = bytes(new_section.SizeOfRawData - new_section.Misc_VirtualSize) pe.__data__ = (