From nobody Sun Feb 8 23:37:17 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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 170.10.129.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=1652342160; cv=none; d=zohomail.com; s=zohoarc; b=RCjPeou0GcnG000ZSs1xaNS4xf/cQ6ak2hlB9RWzB3m9SgCVBXASsF1g62fq40iueObQhcMhgmxoDEClW0K3ubpQ1R88u2oPJUYPpSYVs463Yw2QB8i1TQazyf756TFLHr10TR8dQwN0yct4cvM4CzDU2eGWkWx2yh+gL5MIbS0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1652342160; h=Content-Type:Content-Transfer-Encoding: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=6uqsWHiA81uC9u6N2sItXFEK1Tt6eKrpXK4ZxidCpI8=; b=Pj6XyYI45pF8C6p+aKNrshL9mursnYHnc///8V0ZPnSQcNFmfKOWCMvhIBsMB3+YB1kHadkjBMcHJ0KnaEHgVFcybN+ImDXXv5IJAsz97AAW1zoO1UwmgulI+WJatnpKNEJ1/ksvB2wZDmz9IijkV2B1BGm9G0WVP5VUlj17P3E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1652342160394794.3182991692418; Thu, 12 May 2022 00:56:00 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-611-p2hTn765Mo2Hcnh-ks-yvA-1; Thu, 12 May 2022 03:55:56 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 435AD811E7A; Thu, 12 May 2022 07:55:54 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 12EC02026D6A; Thu, 12 May 2022 07:55:54 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id CCA35194E103; Thu, 12 May 2022 07:55:53 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 387441947B88 for ; Thu, 12 May 2022 07:55:52 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 1969AC28124; Thu, 12 May 2022 07:55:52 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast07.extmail.prod.ext.rdu2.redhat.com [10.11.55.23]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1597DC2810A for ; Thu, 12 May 2022 07:55:52 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id EF91B3C16191 for ; Thu, 12 May 2022 07:55:51 +0000 (UTC) Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-547-SKUSAuXLMJ-WALOTGG-vQQ-1; Thu, 12 May 2022 03:55:50 -0400 Received: by mail-wm1-f69.google.com with SMTP id bg7-20020a05600c3c8700b0039468585269so1320282wmb.3 for ; Thu, 12 May 2022 00:55:50 -0700 (PDT) Received: from wheatley.localdomain (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id w12-20020adfde8c000000b0020c5253d8dfsm3519781wrl.43.2022.05.12.00.55.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 May 2022 00:55:48 -0700 (PDT) Received: from wheatley.redhat.com (wheatley.k8r.cz [127.0.0.1]) by wheatley.localdomain (Postfix) with ESMTP id 586936D329A1 for ; Thu, 12 May 2022 09:55:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652342159; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=6uqsWHiA81uC9u6N2sItXFEK1Tt6eKrpXK4ZxidCpI8=; b=O2AU419EnFshjOkFchgZpV3hC43WLpE3mTCAFK7C118UOY4cuEniq6pPb2ikUCOpVtCfSY 8aHZXaLc5mBd6HzW4G71IyGJjAW4jI4yfyww3SsARR56NxzCzy7NGcHI32jKw6lQOCUzfD 8TJTeoCrCtdpHP2XmyWCS6ahUh6WWaw= X-MC-Unique: p2hTn765Mo2Hcnh-ks-yvA-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: SKUSAuXLMJ-WALOTGG-vQQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6uqsWHiA81uC9u6N2sItXFEK1Tt6eKrpXK4ZxidCpI8=; b=GqlLHXEo+31EC/cte6sXie3ZC3ehYTNjYAGfrh/ArGnPP6km/Wv6Vl+W0GH4D5PxHS hXk+/GkFFfZK1q76KYvX1B47AnkOD+TQiuequozC+tUeWwN1pQu05Yifl6aWIy7nBqbb orPR7lfb/VNsfpsQVvF7wehPRMrCSUvDfcRMZtWcdIaYl+q7hRfJd/VMfltobadNApGd 9SScZe06Ir8O7Xd0ZSx1ADMEDQSUb+encAS6eQOKxNoP1aPodCmVZNDAUYQ4q6wQBLqh c3e8fIsRgzEOqkv2Rf6+nn66YlMHfpqvz2AiMAG+9OekZxvl6kF//C6y+TaItYmai2HP s8Og== X-Gm-Message-State: AOAM530VRtahTgsLSi+8TJrWYjvpBur0POlmw4LKNnT+os6v2wik+K/O mUtBmcuUDq6WiWlx9TsqXW6eeD5Yc7vfwGlhRPcuI/l3kOdQdPBCFofZkkAL26AgaUm7gRbx9Ha vA1WgqtWs9N3gfJCG+9kAM2vNInUssEcszU127bYAYP6WTM8aKrMjt6dwdUcwbp8aPacxStc= X-Received: by 2002:a05:600c:ad1:b0:38c:8bf6:7d6b with SMTP id c17-20020a05600c0ad100b0038c8bf67d6bmr8865863wmr.84.1652342149550; Thu, 12 May 2022 00:55:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw+g5RJ+BriKl4v7xhD8QxXi6DNP3JXkgZM3vuMb38CW2vd8oTPbMHWA94UpSDmN5a7jkL3bg== X-Received: by 2002:a05:600c:ad1:b0:38c:8bf6:7d6b with SMTP id c17-20020a05600c0ad100b0038c8bf67d6bmr8865846wmr.84.1652342149307; Thu, 12 May 2022 00:55:49 -0700 (PDT) From: Martin Kletzander To: libvir-list@redhat.com Subject: [libvirt PATCH 3/4] conf: Add virDomainDefHasSpiceGraphics Date: Thu, 12 May 2022 09:55:47 +0200 Message-Id: <8c0390cce588d53ae4ca838fc151e54835adf77f.1652342145.git.mkletzan@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 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) X-ZM-MESSAGEID: 1652342162054100001 Content-Type: text/plain; charset="utf-8"; x-default="true" It will be used in future patch in multiple places. Signed-off-by: Martin Kletzander --- src/conf/domain_conf.c | 14 ++++++++++++++ src/conf/domain_conf.h | 3 +++ src/libvirt_private.syms | 1 + 3 files changed, 18 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 298ae183ce3f..d9b55c80aafb 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -31558,3 +31558,17 @@ virDomainObjGetMessages(virDomainObj *vm, =20 return rv; } + +bool +virDomainDefHasSpiceGraphics(const virDomainDef *def) +{ + size_t i =3D 0; + + for (i =3D 0; i < def->ngraphics; i++) { + if (def->graphics[i]->type =3D=3D VIR_DOMAIN_GRAPHICS_TYPE_SPICE) { + return true; + } + } + + return false; +} diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index f5d9df3fab1f..2e2da0c69c3b 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -4277,3 +4277,6 @@ int virDomainObjGetMessages(virDomainObj *vm, char ***msgs, unsigned int flags); + +bool +virDomainDefHasSpiceGraphics(const virDomainDef *def); diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index ee4dd8493c3a..93092597516f 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -333,6 +333,7 @@ virDomainDefHasMemoryHotplug; virDomainDefHasNVMeDisk; virDomainDefHasOldStyleROUEFI; virDomainDefHasOldStyleUEFI; +virDomainDefHasSpiceGraphics; virDomainDefHasUSB; virDomainDefHasVcpusOffline; virDomainDefHasVDPANet; --=20 2.35.1