[Patch v2 2/2] kexec: Enable zstd in kexec decompression paths
Simon Horman
horms at kernel.org
Fri Dec 13 04:46:27 PST 2024
[Dropped arb at kernel.org: mail.kernel.org refuses to accept my email otherwise]
On Thu, Dec 12, 2024 at 03:13:25PM -0600, Jeremy Linton wrote:
> The kexec decompression routines support detecting zlib or lzma
> compressed images. Lets add the ability to automatically decompress
> zstd ones as well. The zstd attempt is made after gzip because its
> fairly inexpensive relative lzma, and gzip remains a popular option.
>
> Signed-off-by: Jeremy Linton <jeremy.linton at arm.com>
> Acked-by: Pingfan Liu <piliu at redhat.com>
Thanks, applied.
When doing so I removed the trailing whitespace which I have noted below.
...
> diff --git a/kexec/kexec.c b/kexec/kexec.c
...
> @@ -639,9 +640,12 @@ char *slurp_decompress_file(const char *filename, off_t *r_size)
>
> kernel_buf = zlib_decompress_file(filename, r_size);
> if (!kernel_buf) {
> - kernel_buf = lzma_decompress_file(filename, r_size);
> - if (!kernel_buf)
> - return slurp_file(filename, r_size);
> + kernel_buf = zstd_decompress_file(filename, r_size);
Trailing whitespace on the line above.
> + if (!kernel_buf) {
> + kernel_buf = lzma_decompress_file(filename, r_size);
> + if (!kernel_buf)
> + return slurp_file(filename, r_size);
> + }
> }
> return kernel_buf;
> }
> --
> 2.47.0
>
More information about the kexec
mailing list