Re: [libvirt] [PATCH 01/12] util: Introduce virHostGetDRMRenderNode helper

2018-11-22 Thread Ján Tomko
On Thu, Nov 22, 2018 at 05:35:59PM +0100, Erik Skultety wrote: +char * +virHostGetDRMRenderNode(void) +{ +char *ret = NULL; +DIR *driDir = NULL; +const char *driPath = "/dev/dri"; +struct dirent *ent = NULL; +int dirErr = 0; +bool have_rendernode = false; + +if

[libvirt] [PATCH 01/12] util: Introduce virHostGetDRMRenderNode helper

2018-11-22 Thread Erik Skultety
This is the first step towards libvirt picking the first available render node instead of QEMU. It also makes sense for us to be able to do that, since we allow specifying the node directly for SPICE, so if there's no render node specified by the user, we should pick the first available one. The