Yu Watanabe
16af02cd97
uki-util: move functions for inspecting kernel to uki-util.[ch]
2023-03-17 20:40:34 +09:00
Yu Watanabe
c8eced395b
bootctl: introduce inspect_kernel()
...
Then, now verb_kernel_identify() and verb_kernel_inspect() can share
most of the code.
2023-03-17 20:40:34 +09:00
Yu Watanabe
8102ff2e3d
bootctl: introduce uki_read_pretty_name()
...
No functional change, just prepration for later commits.
2023-03-17 20:40:34 +09:00
Yu Watanabe
748b15c277
bootctl: find matching section in read_pe_section()
...
No functional change, just refactoring.
2023-03-17 20:40:34 +09:00
Yu Watanabe
03221e746d
bootctl: return 0 instead of EXIT_SUCCESS
2023-03-17 20:40:34 +09:00
Yu Watanabe
ab94d98b29
bootctl: move verb_kernel_identity()
...
No functional change, just for making beautify later diffs.
2023-03-17 20:40:34 +09:00
Gerd Hoffmann
78088b8f43
bootctl: tweak DOS header magic check
...
Read the magic first, try reading the full DOS exe header only in case
the magic check succeeds.
This avoids throwing an header read error on small dummy files as used
by test-kernel-install.
2023-03-07 08:14:46 +01:00
Yu Watanabe
1b7586df97
bootctl-uki: several follow-ups for inspect_osrel()
...
Follow-ups for #26124 and #26158 .
- use os_release_pretty_name(),
- constify the buffer passed to inspect_osrel(),
- propagate errors in inspect_osrele(), and ignore them in the caller
side,
- and several coding style fixlets.
2023-01-25 10:51:38 +00:00
Yu Watanabe
5b532e14e3
bootctl-uki: several coding style fixlets
...
Mostly follow-ups for #26082 .
2023-01-24 16:32:34 +01:00
Gerd Hoffmann
2d4260482c
bootctl: kernel-inspect: print os info
2023-01-24 16:32:16 +01:00
Gerd Hoffmann
a05255981b
bootctl: add kernel-inspect command
...
Takes a kernel image as argument. Prints details about the kernel.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
2023-01-18 14:32:14 +01:00
Gerd Hoffmann
53c368d71b
bootctl: add kernel-identity command
...
The command takes a kernel as argument and checks what kind of kernel
the image is. Returns one of uki, pe or unknown.
2023-01-18 14:32:14 +01:00