Re: [PATCH v2 5/5] libxenguest: simplify kernel decompression

2021-01-21 Thread Wei Liu
On Tue, Jan 19, 2021 at 04:17:12PM +0100, Jan Beulich wrote: > In all cases the kernel build makes available the uncompressed size in > the final 4 bytes of the bzImage payload. Utilize this to avoid > repeated realloc()ing of the output buffer. > > As a side effect this also addresses the

[PATCH v2 5/5] libxenguest: simplify kernel decompression

2021-01-19 Thread Jan Beulich
In all cases the kernel build makes available the uncompressed size in the final 4 bytes of the bzImage payload. Utilize this to avoid repeated realloc()ing of the output buffer. As a side effect this also addresses the previous mistaken return of 0 (success) from xc_try_{bzip2,lzma,xz}_decode()