chiark / gitweb /
terminal: make drm-connectors first-level devices
authorDavid Herrmann <dh.herrmann@gmail.com>
Sat, 20 Sep 2014 07:44:14 +0000 (09:44 +0200)
committerDavid Herrmann <dh.herrmann@gmail.com>
Sat, 20 Sep 2014 09:46:49 +0000 (11:46 +0200)
So far, we only forward DRM cards via sysview APIs. However, with MST,
connectors can be hotplugged, too. Forward the connectors as first-level
devices via sysview so API users can react to changing DRM connectors.

src/libsystemd-terminal/sysview.c

index 23d564d..161ea11 100644 (file)
@@ -895,7 +895,7 @@ static int context_ud_hotplug(sysview_context *c, struct udev_device *d) {
 
                 if (streq(subsystem, "input") && startswith(sysname, "event") && safe_atou(sysname + 5, &t) >= 0)
                         type = SYSVIEW_DEVICE_EVDEV;
-                else if (streq(subsystem, "drm") && startswith(sysname, "card") && safe_atou(sysname + 4, &t) >= 0)
+                else if (streq(subsystem, "drm") && startswith(sysname, "card"))
                         type = SYSVIEW_DEVICE_DRM;
                 else
                         type = (unsigned)-1;