mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
qemu_monitor_json: fix JSON generator for VC chardev
The correct backend type is 'vc', same as in qemuBuildChrChardevStr() where we generate qemu command line. Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
63346f2211
commit
8ebfd29cbd
@ -7438,10 +7438,13 @@ qemuMonitorJSONAttachCharDevCommand(const char *chrID,
|
||||
|
||||
switch ((virDomainChrType)chr->type) {
|
||||
case VIR_DOMAIN_CHR_TYPE_NULL:
|
||||
case VIR_DOMAIN_CHR_TYPE_VC:
|
||||
backend_type = "null";
|
||||
break;
|
||||
|
||||
case VIR_DOMAIN_CHR_TYPE_VC:
|
||||
backend_type = "vc";
|
||||
break;
|
||||
|
||||
case VIR_DOMAIN_CHR_TYPE_PTY:
|
||||
backend_type = "pty";
|
||||
break;
|
||||
|
@ -718,7 +718,7 @@ qemuMonitorJSONTestAttachChardev(virDomainXMLOptionPtr xmlopt,
|
||||
|
||||
chr = (virDomainChrSourceDef) { .type = VIR_DOMAIN_CHR_TYPE_VC };
|
||||
CHECK("vc", false,
|
||||
"{'id':'alias','backend':{'type':'null','data':{}}}");
|
||||
"{'id':'alias','backend':{'type':'vc','data':{}}}");
|
||||
|
||||
chr = (virDomainChrSourceDef) { .type = VIR_DOMAIN_CHR_TYPE_PTY };
|
||||
if (qemuMonitorJSONTestAttachOneChardev(xmlopt, schema, "pty", &chr,
|
||||
|
Loading…
x
Reference in New Issue
Block a user