]> git.proxmox.com Git - mirror_qemu.git/commitdiff
qtest: add dummy functions for user emulators
authorBlue Swirl <blauwirbel@gmail.com>
Thu, 19 Apr 2012 18:52:35 +0000 (18:52 +0000)
committerBlue Swirl <blauwirbel@gmail.com>
Thu, 19 Apr 2012 18:52:35 +0000 (18:52 +0000)
Allow qtest to be used also in files used for user emulators by
introducing dummy functions.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
qtest.h

diff --git a/qtest.h b/qtest.h
index 1478343ff00667b509ae42ca9a5c4b6b70784c92..723a4f9536d36b891fa689756964395abba2f673 100644 (file)
--- a/qtest.h
+++ b/qtest.h
@@ -16,6 +16,7 @@
 
 #include "qemu-common.h"
 
+#if !defined(CONFIG_USER_ONLY)
 extern int qtest_allowed;
 extern const char *qtest_chrdev;
 extern const char *qtest_log;
@@ -31,5 +32,22 @@ static inline int qtest_available(void)
 }
 
 int qtest_init(void);
+#else
+static inline bool qtest_enabled(void)
+{
+    return false;
+}
+
+static inline int qtest_available(void)
+{
+    return 0;
+}
+
+static inline int qtest_init(void)
+{
+    return 0;
+}
+
+#endif
 
 #endif