libxenguest: add get_unaligned_le32()
authorJan Beulich <jbeulich@suse.com>
Tue, 26 Jan 2021 13:14:39 +0000 (14:14 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 26 Jan 2021 13:14:39 +0000 (14:14 +0100)
commitd8099d94dfaa3573bd86ebfc457cbc8f70a3ecda
treec7907b6bf8222a3957046ad935dc5dc7eef80c54
parenta8cd9b8aff93b5d55f126910dde77f90d973ac76
libxenguest: add get_unaligned_le32()

Abstract xc_dom_check_gzip()'s reading of the uncompressed size into a
helper re-usable, in particular, by other decompressor code.

Sadly in the mini-os case this conflicts with other functions of the
same name (and purpose), which can't be easily replaced individually.
Yet it was requested that no full set of helpers be introduced at this
point in the release cycle. Hence the awkward XG_NEED_UNALIGNED.

Requested-by: Ian Jackson <iwj@xenproject.org>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Release-Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libs/guest/xg_dom_core.c
tools/libs/guest/xg_dom_decompress_lz4.c
tools/libs/guest/xg_private.h
xen/common/lz4/defs.h