mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
conf: don't force existance of audio child elements
The attributes on the elements are optional, so we should not force the elements themselves to be present, especially since we omit them when formating the XML thus breaking round-tripping. Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
d6b79a64e6
commit
fe304b02f0
@ -13914,15 +13914,10 @@ virDomainAudioDefParseXML(virDomainXMLOptionPtr xmlopt G_GNUC_UNUSED,
|
||||
inputDevNode = virXPathNode("./input", ctxt);
|
||||
outputDevNode = virXPathNode("./output", ctxt);
|
||||
|
||||
if (!inputDevNode || !outputDevNode) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||
_("Audio type OSS requires to have <input> "
|
||||
"and <output> specified"));
|
||||
goto error;
|
||||
}
|
||||
|
||||
def->backend.oss.inputDev = virXMLPropString(inputDevNode, "dev");
|
||||
def->backend.oss.outputDev = virXMLPropString(outputDevNode, "dev");
|
||||
if (inputDevNode)
|
||||
def->backend.oss.inputDev = virXMLPropString(inputDevNode, "dev");
|
||||
if (outputDevNode)
|
||||
def->backend.oss.outputDev = virXMLPropString(outputDevNode, "dev");
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user