aboutsummaryrefslogtreecommitdiffstats
path: root/drminfo.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2016-09-30 12:18:44 +0200
committerGerd Hoffmann <kraxel@redhat.com>2016-09-30 12:24:05 +0200
commit0a555e7117791a393700fd622fac0d23ee2938c0 (patch)
tree4391b3ae13445d65ab50287804a84a6fe0e328c7 /drminfo.c
parentc6eb0c2706b08746e5a6accce1b0f2d10600428c (diff)
downloaddrminfo-0a555e7117791a393700fd622fac0d23ee2938c0.tar.gz
print busid
Diffstat (limited to 'drminfo.c')
-rw-r--r--drminfo.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drminfo.c b/drminfo.c
index 173ae15..4dc1b4c 100644
--- a/drminfo.c
+++ b/drminfo.c
@@ -22,7 +22,7 @@ static void drm_info(int devnr)
drmModeEncoder *enc;
drmModeCrtc *crtc;
drmModeRes *res;
- char dev[64];
+ char dev[64], *busid;
int fd, i, m, c, e;
snprintf(dev, sizeof(dev), DRM_DEV_NAME, DRM_DIR_NAME, devnr);
@@ -32,6 +32,12 @@ static void drm_info(int devnr)
exit(1);
}
+ busid = drmGetBusid(fd);
+ if (busid) {
+ fprintf(stdout, "busid: \"%s\"\n", busid);
+ }
+ fprintf(stdout, "\n");
+
res = drmModeGetResources(fd);
if (res == NULL) {
fprintf(stderr, "drmModeGetResources() failed\n");