aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2020-01-08 15:47:02 +0100
committerGerd Hoffmann <kraxel@redhat.com>2020-01-14 07:26:36 +0100
commitc388f408b538b38db83999fd20b17020d5fdf68f (patch)
tree40dc55914bc484b124963f1792a7f2508dd52c1a /ui
parent3c8a6575985b1652b45bfa670b5e1907d642cfa0 (diff)
downloadqemu-c388f408b538b38db83999fd20b17020d5fdf68f.zip
qemu-c388f408b538b38db83999fd20b17020d5fdf68f.tar.gz
qemu-c388f408b538b38db83999fd20b17020d5fdf68f.tar.bz2
ui: Print available display backends with '-display help'
We already print availabled devices with "-device help", or available backends with "-netdev help" or "-chardev help". Let's provide a way for the users to query the available display backends, too. Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com> Message-id: 20200108144702.29969-1-thuth@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/console.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/ui/console.c b/ui/console.c
index ac79d67..69339b0 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -2333,6 +2333,21 @@ void qemu_display_init(DisplayState *ds, DisplayOptions *opts)
dpys[opts->type]->init(ds, opts);
}
+void qemu_display_help(void)
+{
+ int idx;
+
+ printf("Available display backend types:\n");
+ for (idx = DISPLAY_TYPE_NONE; idx < DISPLAY_TYPE__MAX; idx++) {
+ if (!dpys[idx]) {
+ ui_module_load_one(DisplayType_str(idx));
+ }
+ if (dpys[idx]) {
+ printf("%s\n", DisplayType_str(dpys[idx]->type));
+ }
+ }
+}
+
void qemu_chr_parse_vc(QemuOpts *opts, ChardevBackend *backend, Error **errp)
{
int val;