]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/ukify/ukify.py
ukify: catch error when loading foreign pe file
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 20 Dec 2022 09:20:35 +0000 (10:20 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 20 Dec 2022 09:39:10 +0000 (10:39 +0100)
commit33bdec184f08d955979484d63bb60fba3942adca
tree68c8d3e3e7be1b4c828b9c396e88fdfa6e44497a
parent57e7af551edafa8ad840a26c28184bc6339e09ad
ukify: catch error when loading foreign pe file

The autodetection code is supposed to throw ValueError when it
cannot figure out the version so that we fall back to the next method.
With the patch:
  Kernel version not specified, starting autodetection 😖.
  Real-Mode Kernel Header magic not found
  + readelf --notes vmlinuz/arm64/vmlinuz-6.0.9-300.fc37.aarch64
  readelf: vmlinuz/arm64/vmlinuz-6.0.9-300.fc37.aarch64: Error: Not an ELF file - it has the wrong magic bytes at the start
  Found uname version: 6.0.9-300.fc37.aarch64
src/ukify/ukify.py