eeze: Add ability to get syspath from a watch for DRM
authorChris Michael <cp.michael@samsung.com>
Tue, 23 Sep 2014 13:57:20 +0000 (09:57 -0400)
committerChris Michael <cp.michael@samsung.com>
Tue, 23 Sep 2014 14:04:30 +0000 (10:04 -0400)
Summary: This adds the EEZE_UDEV_TYPE_DRM to the switch for
_get_syspath_from_watch.

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
src/lib/eeze/eeze_udev_watch.c

index 6ff9e85..c51f396 100644 (file)
@@ -235,6 +235,12 @@ _get_syspath_from_watch(void             *data,
           goto error;
         break;
 
+      case EEZE_UDEV_TYPE_DRM:
+        if ((!(test = udev_device_get_subsystem(device)))
+            || (strcmp(test, "drm")))
+          goto error;
+
+        break;
       default:
         break;
      }
@@ -315,6 +321,11 @@ eeze_udev_watch_add(Eeze_Udev_Type     type,
                                                         NULL);
         break;
 
+      case EEZE_UDEV_TYPE_DRM:
+        udev_monitor_filter_add_match_subsystem_devtype(mon, "drm_minor",
+                                                        NULL);
+        break;
+
       default:
         break;
      }