Back to index

libdrm  2.4.37
Functions
getversion.c File Reference
#include "drmtest.h"

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 Checks DRM_IOCTL_GET_VERSION and libdrm's drmGetVersion() interface to it.

Function Documentation

int main ( int  argc,
char **  argv 
)

Checks DRM_IOCTL_GET_VERSION and libdrm's drmGetVersion() interface to it.

Definition at line 33 of file getversion.c.

{
       int fd;
       drmVersionPtr v;

       fd = drm_open_any();
       v = drmGetVersion(fd);
       assert(strlen(v->name) != 0);
       assert(strlen(v->date) != 0);
       assert(strlen(v->desc) != 0);
       if (strcmp(v->name, "i915") == 0)
              assert(v->version_major >= 1);
       drmFree(v);
       close(fd);
       return 0;
}

Here is the call graph for this function: