]> git.ipfire.org Git - thirdparty/systemd.git/commit
bootctl: refactor get_file_version() to use proper PE parsing 42246/head
authorLennart Poettering <lennart@amutable.com>
Fri, 22 May 2026 02:34:54 +0000 (04:34 +0200)
committerLennart Poettering <lennart@amutable.com>
Fri, 22 May 2026 10:26:25 +0000 (12:26 +0200)
commite3e897cf8fe56d5ff48a8cf56fdcfdfc010db0f5
tree37270231a7c4f9af3f3838ad50f59f3acd6ffb6b
parent7c17b25fa460b030b0f566847d26f54d3c74c9dc
bootctl: refactor get_file_version() to use proper PE parsing

This irked me for a while. Let's not scan for strings stupidly, but
properly parse PE files to find the magic marker.

It's easy with our own PE APIs, hence we should do it.

This moves logging to the callers (previously, this was all mixed up).
src/bootctl/bootctl-install.c
src/bootctl/bootctl-status.c
src/bootctl/bootctl-util.c
test/units/TEST-87-AUX-UTILS-VM.bootctl.sh