[libvirt] [PATCH v3 02/11] conf: Introduce virDomainGraphics-related helpers

Ján Tomko jtomko at redhat.com
Fri Nov 30 13:59:31 UTC 2018


On Thu, Nov 29, 2018 at 03:20:12PM +0100, Erik Skultety wrote:
>A few simple helpers that allow us to determine whether a graphics can
>and will need to make use of a DRM render node.
>
>Signed-off-by: Erik Skultety <eskultet at redhat.com>
>---
> src/conf/domain_conf.c   | 41 ++++++++++++++++++++++++++++++++++++++++
> src/conf/domain_conf.h   |  9 +++++++++
> src/libvirt_private.syms |  3 +++
> 3 files changed, 53 insertions(+)
>
>+bool
>+virDomainGraphicsNeedsRenderNode(const virDomainGraphicsDef *graphics)

Consider:
NeedsAutoRenderNode

(in a way graphics with a rendernode already specified also needs it)

>+{
>+    if (!virDomainGraphicsSupportsRenderNode(graphics) ||
>+        virDomainGraphicsGetRenderNode(graphics))
>+        return false;

Personally I'd decouple these two conditions.

>+
>+    return true;
>+}

Regardless:
Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20181130/a5ca7c97/attachment-0001.sig>


More information about the libvir-list mailing list