diff options
author | Lichen Liu <lichliu@redhat.com> | 2022-03-25 15:06:15 +0800 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2022-03-29 10:59:01 +0200 |
commit | dcfcc73c73e6c739b6809f5249ac23c788faf2c7 (patch) | |
tree | 0a63eedcbc28d80d349a364db4050a64ccfe5f49 /purgatory | |
parent | f4c59879b830c7d574a953e6ce970ddaf20910d7 (diff) |
kexec-tools: Determine if the image is lzma commpressed
Currently there are 2 functions for decompressing compressed image. The
zlib_decompress_file() will determine if the image is compressed by gzip
before read, but lzma_decompress_file() will not. This can cause misleading
information to be printed when the image is not compressed by lzma and
debug option is used:
]# kexec -d -s -l /boot/vmlinuz-5.14.10-300.fc35.x86_64 \
--initrd /boot/initramfs-5.14.10-300.fc35.x86_64.img \
--reuse-cmdline
Try gzip decompression.
Try LZMA decompression.
lzma_decompress_file: read on /boot/vmlinuz-5.14.10-300.fc35.x86_64 of
65536 bytes failed
Add a helper function is_lzma_file() to help behave consistently.
Signed-off-by: Lichen Liu <lichliu@redhat.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'purgatory')
0 files changed, 0 insertions, 0 deletions