aboutsummaryrefslogtreecommitdiff
path: root/tests/libqos
diff options
context:
space:
mode:
Diffstat (limited to 'tests/libqos')
-rw-r--r--tests/libqos/fw_cfg.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/libqos/fw_cfg.c b/tests/libqos/fw_cfg.c
index 799139edee..e386ff7ba7 100644
--- a/tests/libqos/fw_cfg.c
+++ b/tests/libqos/fw_cfg.c
@@ -11,6 +11,7 @@
*/
#include "libqos/fw_cfg.h"
+#include "qemu/bswap.h"
void qfw_cfg_select(QFWCFG *fw_cfg, uint16_t key)
{
@@ -32,20 +33,20 @@ uint16_t qfw_cfg_get_u16(QFWCFG *fw_cfg, uint16_t key)
{
uint16_t value;
qfw_cfg_get(fw_cfg, key, &value, sizeof(value));
- return value;
+ return le16_to_cpu(value);
}
uint32_t qfw_cfg_get_u32(QFWCFG *fw_cfg, uint16_t key)
{
uint32_t value;
qfw_cfg_get(fw_cfg, key, &value, sizeof(value));
- return value;
+ return le32_to_cpu(value);
}
uint64_t qfw_cfg_get_u64(QFWCFG *fw_cfg, uint16_t key)
{
uint64_t value;
qfw_cfg_get(fw_cfg, key, &value, sizeof(value));
- return value;
+ return le64_to_cpu(value);
}