[libvirt] [PATCH 01/12] util: Introduce virHostGetDRMRenderNode helper
Ján Tomko
jtomko at redhat.com
Thu Nov 22 17:26:23 UTC 2018
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 (virDirOpen(&driDir, driPath) < 0)
>+ return NULL;
>+
>+ while ((dirErr = virDirRead(driDir, &ent, driPath)) > 0) {
>+ if (ent->d_type != DT_CHR)
>+ continue;
>+
>+ if (STREQLEN(ent->d_name, "renderD", 7)) {
aka STRPREFIX
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/20181122/18bea118/attachment-0001.sig>
More information about the libvir-list
mailing list