cmd: ximg: handle Z_BUF_ERROR explicitly in GZIP decompression
authorAristo Chen <jj251510319013@gmail.com>
Thu, 8 May 2025 19:37:24 +0000 (19:37 +0000)
committerTom Rini <trini@konsulko.com>
Thu, 22 May 2025 20:26:38 +0000 (14:26 -0600)
commitef305ceff9c875a7c16fdffc5e120d8ddf6243b7
treed11d70f312774bdd7416fc21eb663a6a30323188
parent86acdce2ba886153f152b924b28e5c040e316c80
cmd: ximg: handle Z_BUF_ERROR explicitly in GZIP decompression

When decompressing GZIP-compressed image parts via the `imxtract` command,
explicitly handle the `Z_BUF_ERROR` return value from `gunzip()` to provide
a clearer diagnostic. This error typically indicates that the destination
buffer is too small to hold the uncompressed data.

Signed-off-by: Aristo Chen <aristo.chen@canonical.com>
[trini: Rework to indent the whole case with { } due to not using the
C23 extension]
Signed-off-by: Tom Rini <trini@konsulko.com>
cmd/ximg.c