mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
qemuMonitorJSONAttachCharDev: Teach spicevmc
https://bugzilla.redhat.com/show_bug.cgi?id=1298070 We have the code for attaching redirdevs for ages now. Unfortunately, our monitor code that handles talking to the qemu process was missing a little piece of code that actually enabled the feature. BTW: it really is called "type" on the monitor, even though it's called "name" on the cmd line. Don't ask. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
559b78d96a
commit
3668526fa6
@ -6209,6 +6209,13 @@ qemuMonitorJSONAttachCharDevCommand(const char *chrID,
|
||||
break;
|
||||
|
||||
case VIR_DOMAIN_CHR_TYPE_SPICEVMC:
|
||||
backend_type = "spicevmc";
|
||||
|
||||
if (virJSONValueObjectAppendString(data, "type",
|
||||
virDomainChrSpicevmcTypeToString(chr->data.spicevmc)) < 0)
|
||||
goto error;
|
||||
break;
|
||||
|
||||
case VIR_DOMAIN_CHR_TYPE_SPICEPORT:
|
||||
case VIR_DOMAIN_CHR_TYPE_PIPE:
|
||||
case VIR_DOMAIN_CHR_TYPE_STDIO:
|
||||
|
@ -769,7 +769,7 @@ testQemuMonitorJSONAttachChardev(const void *data)
|
||||
CHECK("chr_unix", "{\"return\": {}}");
|
||||
|
||||
chr = (virDomainChrSourceDef) { .type = VIR_DOMAIN_CHR_TYPE_SPICEVMC };
|
||||
CHECK_FAIL("chr_spicevmc", "{\"return\": {}}");
|
||||
CHECK("chr_spicevmc", "{\"return\": {}}");
|
||||
|
||||
chr = (virDomainChrSourceDef) { .type = VIR_DOMAIN_CHR_TYPE_PIPE };
|
||||
CHECK_FAIL("chr_pipe", "{\"return\": {}}");
|
||||
|
Loading…
Reference in New Issue
Block a user