From 77064438d4b2ff6f768e5cec089af7f4d4e067a2 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Wed, 7 Oct 2020 13:46:38 +0200 Subject: [PATCH] bhyve: parse: Set video device model when parsing bhyve commandline Add the proper video device type when parsing bhyve's commandline into a XML. Signed-off-by: Peter Krempa Reviewed-by: Roman Bogorodskiy --- src/bhyve/bhyve_parse_command.c | 2 ++ tests/bhyveargv2xmldata/bhyveargv2xml-vnc-listen.xml | 2 +- tests/bhyveargv2xmldata/bhyveargv2xml-vnc-password.xml | 2 +- tests/bhyveargv2xmldata/bhyveargv2xml-vnc-resolution.xml | 2 +- tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-io.xml | 2 +- tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-off.xml | 2 +- tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-on.xml | 2 +- tests/bhyveargv2xmldata/bhyveargv2xml-vnc.xml | 2 +- 8 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/bhyve/bhyve_parse_command.c b/src/bhyve/bhyve_parse_command.c index 969e782b27..4f1d384da1 100644 --- a/src/bhyve/bhyve_parse_command.c +++ b/src/bhyve/bhyve_parse_command.c @@ -573,6 +573,8 @@ bhyveParsePCIFbuf(virDomainDefPtr def, if (!(video = virDomainVideoDefNew(xmlopt))) goto cleanup; + video->type = VIR_DOMAIN_VIDEO_TYPE_GOP; + if (!(graphics = virDomainGraphicsDefNew(xmlopt))) goto cleanup; diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-listen.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-listen.xml index 4ab17aef81..616f8e180e 100644 --- a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-listen.xml +++ b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-listen.xml @@ -16,7 +16,7 @@ diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-password.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-password.xml index 456a1ee9e3..be15a20d91 100644 --- a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-password.xml +++ b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-password.xml @@ -16,7 +16,7 @@ diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-resolution.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-resolution.xml index f8fa0ed1ce..662961ba0d 100644 --- a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-resolution.xml +++ b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-resolution.xml @@ -16,7 +16,7 @@ diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-io.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-io.xml index 1e2f3d6938..4ead57217a 100644 --- a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-io.xml +++ b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-io.xml @@ -16,7 +16,7 @@ diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-off.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-off.xml index 3c9c76e5aa..0623938b65 100644 --- a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-off.xml +++ b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-off.xml @@ -17,7 +17,7 @@ diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-on.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-on.xml index b83772c47a..01aa559cb4 100644 --- a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-on.xml +++ b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc-vga-on.xml @@ -17,7 +17,7 @@ diff --git a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc.xml b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc.xml index 1e2f3d6938..4ead57217a 100644 --- a/tests/bhyveargv2xmldata/bhyveargv2xml-vnc.xml +++ b/tests/bhyveargv2xmldata/bhyveargv2xml-vnc.xml @@ -16,7 +16,7 @@