aboutsummaryrefslogtreecommitdiff
path: root/qtest.c
diff options
context:
space:
mode:
authorLaurent Vivier <lvivier@redhat.com>2020-02-06 00:20:15 +0100
committerDavid Gibson <david@gibson.dropbear.id.au>2020-02-21 09:15:03 +1100
commit2c6e918ef8a101d86e0592051a1ee4bf493a6785 (patch)
tree9bef399882cf9665009b3a4f0fe842080ae28abb /qtest.c
parenta4c3791ae0c4a2e1f5d91f078bc9ad6e5d58867e (diff)
downloadqemu-2c6e918ef8a101d86e0592051a1ee4bf493a6785.zip
qemu-2c6e918ef8a101d86e0592051a1ee4bf493a6785.tar.gz
qemu-2c6e918ef8a101d86e0592051a1ee4bf493a6785.tar.bz2
qtest: Fix rtas dependencies
qtest "rtas" command is only available with pseries not all ppc64 targets, so if I try to compile only powernv machine, the build fails with: /usr/bin/ld: qtest.o: in function `qtest_process_command': .../qtest.c:645: undefined reference to `qtest_rtas_call' We fix this by enabling rtas command only with pseries machine. Fixes: eeddd59f5962 ("tests: add RTAS command in the protocol") Signed-off-by: Laurent Vivier <lvivier@redhat.com> Message-Id: <20200205232016.588202-2-lvivier@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'qtest.c')
-rw-r--r--qtest.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/qtest.c b/qtest.c
index 12432f9..587dcbb 100644
--- a/qtest.c
+++ b/qtest.c
@@ -27,7 +27,8 @@
#include "qemu/error-report.h"
#include "qemu/module.h"
#include "qemu/cutils.h"
-#ifdef TARGET_PPC64
+#include "config-devices.h"
+#ifdef CONFIG_PSERIES
#include "hw/ppc/spapr_rtas.h"
#endif
@@ -628,7 +629,7 @@ static void qtest_process_command(CharBackend *chr, gchar **words)
#else
qtest_sendf(chr, "OK little\n");
#endif
-#ifdef TARGET_PPC64
+#ifdef CONFIG_PSERIES
} else if (strcmp(words[0], "rtas") == 0) {
uint64_t res, args, ret;
unsigned long nargs, nret;