All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@verge.net.au>
To: kexec@lists.infradead.org
Subject: [PATCH v2] kexec-tools: Determine if the image is lzma commpressed
Date: Wed, 30 Mar 2022 11:13:04 +0200	[thread overview]
Message-ID: <YkQfIPAwuZRsXN41@vergenet.net> (raw)
In-Reply-To: <20220330053326.3220260-1-lichliu@redhat.com>

On Wed, Mar 30, 2022 at 01:33:26PM +0800, Lichen Liu wrote:
> 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>
> ---
> Changes in v2:
> - add a fclose() when file is too small.

Hi Lichen Liu,

I have already applied v1 of this patch,
so could you consider providing a follow-up patch
which contains the delta between v1 and v2?

Thanks!

Ref: https://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git/commit/1b03cf7adc3c


  reply	other threads:[~2022-03-30  9:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-30  5:33 [PATCH v2] kexec-tools: Determine if the image is lzma commpressed Lichen Liu
2022-03-30  9:13 ` Simon Horman [this message]
2022-03-30 11:05   ` Lichen Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YkQfIPAwuZRsXN41@vergenet.net \
    --to=horms@verge.net.au \
    --cc=kexec@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.