aboutsummaryrefslogtreecommitdiff
path: root/include/ui/qemu-spice.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/ui/qemu-spice.h')
-rw-r--r--include/ui/qemu-spice.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/ui/qemu-spice.h b/include/ui/qemu-spice.h
index a93b4b2572..db7926d50b 100644
--- a/include/ui/qemu-spice.h
+++ b/include/ui/qemu-spice.h
@@ -88,4 +88,14 @@ static inline int qemu_spice_display_add_client(int csock, int skipauth,
#endif /* CONFIG_SPICE */
+static inline bool qemu_using_spice(Error **errp)
+{
+ if (!using_spice) {
+ /* correct one? spice isn't a device ,,, */
+ error_set(errp, QERR_DEVICE_NOT_ACTIVE, "spice");
+ return false;
+ }
+ return true;
+}
+
#endif /* QEMU_SPICE_H */