It will be used in future patch in multiple places. Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx> --- 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, return rv; } + +bool +virDomainDefHasSpiceGraphics(const virDomainDef *def) +{ + size_t i = 0; + + for (i = 0; i < def->ngraphics; i++) { + if (def->graphics[i]->type == 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; -- 2.35.1