aboutsummaryrefslogtreecommitdiffstats
path: root/include/prereq-build.mk
diff options
context:
space:
mode:
authorChristian Lamparter <chunkeey@gmail.com>2017-11-19 17:19:21 +0100
committerJo-Philipp Wich <jo@mein.io>2017-12-13 13:13:51 +0100
commit135aa3ba7e9d481ae78e01826fe64d73d10a0aff (patch)
tree56a6a48858d16f79a32a35713231c747fcba412d /include/prereq-build.mk
parent207bcea1de02799b744ddca22d022456123e7566 (diff)
downloadupstream-135aa3ba7e9d481ae78e01826fe64d73d10a0aff.tar.gz
upstream-135aa3ba7e9d481ae78e01826fe64d73d10a0aff.tar.bz2
upstream-135aa3ba7e9d481ae78e01826fe64d73d10a0aff.zip
base-files: upgrade: make get_partitions() endian agnostic
This patch fixes two issues with the current get_partitions() function. First: "Invalid partition table on $disk" will pop up on legitimate images on big endian system. This is because the little-endian representation of "55 AA" is assumed in the context of little-endian architectures. On these comparing it to the 16-bit word 0xAA55 does work as intented. Whereas on big-endian systems, this would have to be 0x55AA. This patch fixes the issue by replacing the integer conversion and value match check with just a string comparision. Second: The extraction of the type, start LBA and LBA num from the partition table has the same endianness issue. This has been fixed by using the new hex_le32_to_cpu() function. This function will translate the stored little-endian data to the correct byte-order if necessary. Signed-off-by: Christian Lamparter <chunkeey@gmail.com> (cherry picked from commit 4e3f6dae04fb526a78e613db6c65aee584403d36)
Diffstat (limited to 'include/prereq-build.mk')
0 files changed, 0 insertions, 0 deletions