aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hmp-commands.hx2
-rw-r--r--qapi/ui.json3
-rw-r--r--ui/ui-hmp-cmds.c2
-rw-r--r--ui/ui-qmp-cmds.c2
4 files changed, 8 insertions, 1 deletions
diff --git a/hmp-commands.hx b/hmp-commands.hx
index c0a2768..765349e 100644
--- a/hmp-commands.hx
+++ b/hmp-commands.hx
@@ -252,6 +252,7 @@ SRST
ERST
+#ifdef CONFIG_PIXMAN
{
.name = "screendump",
.args_type = "filename:F,format:-fs,device:s?,head:i?",
@@ -267,6 +268,7 @@ SRST
``screendump`` *filename*
Save screen into PPM image *filename*.
ERST
+#endif
{
.name = "logfile",
diff --git a/qapi/ui.json b/qapi/ui.json
index 006616a..e74cc3e 100644
--- a/qapi/ui.json
+++ b/qapi/ui.json
@@ -200,7 +200,8 @@
{ 'command': 'screendump',
'data': {'filename': 'str', '*device': 'str', '*head': 'int',
'*format': 'ImageFormat'},
- 'coroutine': true }
+ 'coroutine': true,
+ 'if': 'CONFIG_PIXMAN' }
##
# == Spice
diff --git a/ui/ui-hmp-cmds.c b/ui/ui-hmp-cmds.c
index c671389..26c8ced 100644
--- a/ui/ui-hmp-cmds.c
+++ b/ui/ui-hmp-cmds.c
@@ -437,6 +437,7 @@ void sendkey_completion(ReadLineState *rs, int nb_args, const char *str)
}
}
+#ifdef CONFIG_PIXMAN
void coroutine_fn
hmp_screendump(Monitor *mon, const QDict *qdict)
{
@@ -458,6 +459,7 @@ hmp_screendump(Monitor *mon, const QDict *qdict)
end:
hmp_handle_error(mon, err);
}
+#endif
void hmp_client_migrate_info(Monitor *mon, const QDict *qdict)
{
diff --git a/ui/ui-qmp-cmds.c b/ui/ui-qmp-cmds.c
index debc07d..d772e1c 100644
--- a/ui/ui-qmp-cmds.c
+++ b/ui/ui-qmp-cmds.c
@@ -212,6 +212,7 @@ void qmp_client_migrate_info(const char *protocol, const char *hostname,
error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "protocol", "'spice'");
}
+#ifdef CONFIG_PIXMAN
#ifdef CONFIG_PNG
/**
* png_save: Take a screenshot as PNG
@@ -391,3 +392,4 @@ qmp_screendump(const char *filename, const char *device,
}
}
}
+#endif /* CONFIG_PIXMAN */