OSDN Git Service

tests/bios-tables-test: Fix endianess problems when passing data to iasl
authorThomas Huth <thuth@redhat.com>
Thu, 16 Nov 2017 12:17:02 +0000 (13:17 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 16 Nov 2017 16:36:54 +0000 (18:36 +0200)
commit3831c07b89ab1f7aa1427bc56e9cdf70f5367933
tree8c3b2b8a0956bf8d8d1f4fa17fc469183eac6202
parentf865da7c369fa00b2ccaf6bce158ad2701b2a27c
tests/bios-tables-test: Fix endianess problems when passing data to iasl

The bios-tables-test was writing out files that we pass to iasl in
with the wrong endianness in the header when running on a big endian
host. So instead of storing mixed endian information in our structures,
let's keep everything in little endian and byte-swap it only when we
need a value in the code.

Reported-by: Daniel P. Berrange <berrange@redhat.com>
Buglink: https://bugs.launchpad.net/qemu/+bug/1724570
Suggested-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Tested-by: "Daniel P. Berrange" <berrange@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
tests/acpi-utils.h
tests/bios-tables-test.c
tests/vmgenid-test.c