From nobody Sat Feb 7 08:27:08 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1621433939; cv=none; d=zohomail.com; s=zohoarc; b=fF3tfUbLa9VGrpMYvDOc5+4Z0ovDIIGwWRf2ayKb7A0CLT20g66VwvHgTm3K6VC6UiMGLDTTLu2gblePJruSzulHIg0QXdnjzminmURPkw8FreTBhcAfvqmWGrRUV28anXvfuKMn5a7WhEsWRFhf83Cs+1SkUmBaFIN9f7Zwvk0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621433939; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=aPIWat+objtmd8bPhDMYQCEXfSg6OtAvqMO1Afmi1+E=; b=fLU8MvgZrY4OcLWas6X7e+zWk+qsZUxS5tbDyjtdnF15oJEM8pBQ2iTky/q59dqKcErCg525SUJ/sEYIg601l6oKNx7HUjQcFg3kmXgr/109OyxHwn+I4eBC0UPCbADv5vWGCryU/J5Fb5N3OyBSD2VGfLKEdEvYL4C6aL+5WsM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1621433939401737.5575489072496; Wed, 19 May 2021 07:18:59 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-295-IP7OcCPLNouq-EfRe5yDxw-1; Wed, 19 May 2021 10:18:54 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 34A82108BD08; Wed, 19 May 2021 14:18:48 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 09AC951C35; Wed, 19 May 2021 14:18:48 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id B910D59CD3; Wed, 19 May 2021 14:18:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 14JEAKIq011845 for ; Wed, 19 May 2021 10:10:20 -0400 Received: by smtp.corp.redhat.com (Postfix) id 37CCA1037F34; Wed, 19 May 2021 14:10:20 +0000 (UTC) Received: from work.redhat.com (ovpn-113-53.ams2.redhat.com [10.36.113.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7E88B10013C1; Wed, 19 May 2021 14:10:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621433936; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=aPIWat+objtmd8bPhDMYQCEXfSg6OtAvqMO1Afmi1+E=; b=KTHgHgvl34BxYCs1Xva1BKcwUroQsWh3k2w2yGDhR528CeFVCoLaKNWVWVmKSujo0bs9PO ULJbh78TRgnfLA+y6cVpY7tWnI6FRrrQyDul1Fv/jRmaQ7by9pMN6Zry3DlA+c7LdRRzxM w+fLWTSUnnxuOJFsxB85EtdwwdWtb3o= X-MC-Unique: IP7OcCPLNouq-EfRe5yDxw-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 03/10] virDomainAudioDef: Change type of "sdl.driver" to virDomainAudioSDLDriver Date: Wed, 19 May 2021 16:10:05 +0200 Message-Id: <20210519141012.125114-4-twiederh@redhat.com> In-Reply-To: <20210519141012.125114-1-twiederh@redhat.com> References: <20210519141012.125114-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake --- src/conf/domain_conf.c | 17 +++++++++-------- src/conf/domain_conf.h | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 758f699c2c..9e6719265f 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -13236,15 +13236,16 @@ virDomainAudioDefParseXML(virDomainXMLOption *xml= opt G_GNUC_UNUSED, break; =20 case VIR_DOMAIN_AUDIO_TYPE_SDL: { - g_autofree char *driver =3D virXMLPropString(node, "driver"); - if (driver && - (def->backend.sdl.driver =3D - virDomainAudioSDLDriverTypeFromString(driver)) <=3D 0) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown SDL driver '%s'"), driver); - goto error; + g_autofree char *driverstr =3D virXMLPropString(node, "driver"); + int driver; + if (driverstr) { + if ((driver =3D virDomainAudioSDLDriverTypeFromString(driverst= r)) <=3D 0) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("unknown SDL driver '%s'"), driverstr); + goto error; + } + def->backend.sdl.driver =3D driver; } - if (inputNode) virDomainAudioSDLParse(&def->backend.sdl.input, inputNode); if (outputNode) diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 462c61a807..fab856a5c7 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1578,7 +1578,7 @@ struct _virDomainAudioDef { struct { virDomainAudioIOSDL input; virDomainAudioIOSDL output; - int driver; /* virDomainAudioSDLDriver */ + virDomainAudioSDLDriver driver; } sdl; struct { char *path; --=20 2.26.3