aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2023-08-30 13:38:29 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2023-11-07 14:04:25 +0400
commitf38aa2c7c0c85d8f978a3c23ab0a32578fc73134 (patch)
tree60521141ac04fd3ca62323a183e617a9c207be87 /ui
parent600179c39efb30cf072e18c7604ccf52360684c6 (diff)
qmp/hmp: disable screendump if PIXMAN is missing
The command requires color conversion and line-by-line feeding. We could have a simple fallback for simple formats though. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/ui-hmp-cmds.c2
-rw-r--r--ui/ui-qmp-cmds.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/ui/ui-hmp-cmds.c b/ui/ui-hmp-cmds.c
index c671389473..26c8ced1f2 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 debc07d678..d772e1cb7f 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 */