Signed-off-by: Tim Wiederhake <twiederh(a)redhat.com>
---
src/conf/domain_conf.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 6559c3d2f8..fe35a3960e 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -14025,23 +14025,13 @@ virDomainAudioDefParseXML(virDomainXMLOptionPtr xmlopt
G_GNUC_UNUSED,
break;
case VIR_DOMAIN_AUDIO_TYPE_OSS: {
- g_autofree char *tryMMap = virXMLPropString(node, "tryMMap");
- g_autofree char *exclusive = virXMLPropString(node, "exclusive");
g_autofree char *dspPolicy = virXMLPropString(node, "dspPolicy");
- if (tryMMap && ((def->backend.oss.tryMMap =
- virTristateBoolTypeFromString(tryMMap)) <= 0)) {
- virReportError(VIR_ERR_XML_ERROR,
- _("unknown 'tryMMap' value '%s'"),
tryMMap);
+ if (virXMLPropYesNo(node, "tryMMap", &def->backend.oss.tryMMap)
< 0)
goto error;
- }
- if (exclusive && ((def->backend.oss.exclusive =
- virTristateBoolTypeFromString(exclusive)) <= 0)) {
- virReportError(VIR_ERR_XML_ERROR,
- _("unknown 'exclusive' value '%s'"),
exclusive);
+ if (virXMLPropYesNo(node, "exclusive",
&def->backend.oss.exclusive) < 0)
goto error;
- }
if (dspPolicy) {
if (virStrToLong_i(dspPolicy, NULL, 10,
--
2.26.2