mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
Set default name for SPICE agent channel
libvirt documentation for channels with type 'spicevmc' says that the 'target' child node has: "an optional attribute name controls how the guest will have access to the channel, and defaults to name='com.redhat.spice.0'." However, this default value is never set in libvirt code base, there's only a check in qemu_command.c to error out if the name attribute doesn't have the expected value (if it's set). This commit sets a default target name for spicevmc channels during the domain configuration parsing so that the code agrees with the documentation.
This commit is contained in:
parent
03ca3317a6
commit
b0e2bb33d8
@ -5248,6 +5248,13 @@ virDomainChrDefParseXML(virCapsPtr caps,
|
|||||||
goto error;
|
goto error;
|
||||||
} else {
|
} else {
|
||||||
def->source.data.spicevmc = VIR_DOMAIN_CHR_SPICEVMC_VDAGENT;
|
def->source.data.spicevmc = VIR_DOMAIN_CHR_SPICEVMC_VDAGENT;
|
||||||
|
if (!def->target.name) {
|
||||||
|
def->target.name = strdup("com.redhat.spice.0");
|
||||||
|
if (!def->target.name) {
|
||||||
|
virReportOOMError();
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user