summaryrefslogtreecommitdiff
path: root/src/lib/eeze
diff options
context:
space:
mode:
authorNicolas Aguirre <aguirre.nicolas@gmail.com>2015-11-27 09:53:21 +0100
committerCedric BAIL <cedric@osg.samsung.com>2016-02-10 10:46:45 -0800
commit95a494c73e8c04dc63b9e0879fc60388f1277986 (patch)
treeb140e0850b15dcfe891d11a83bb575731f830b27 /src/lib/eeze
parent1d99c5b9070e6111294b2d75d84d62df88935214 (diff)
eeze: add case for Graphics subsystems in eeze_udev_find_by_type
Add code to detect Graphics subsystem, i.e framebuffer devices /dev/fbX in eeze. This will be used in Ecore-Fb to detect the framebuffers present on the system. @feature Signed-off-by: Nicolas Aguirre <aguirre.nicolas@gmail.com> Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'src/lib/eeze')
-rw-r--r--src/lib/eeze/Eeze.h6
-rw-r--r--src/lib/eeze/eeze_udev_find.c5
-rw-r--r--src/lib/eeze/eeze_udev_watch.c10
3 files changed, 20 insertions, 1 deletions
diff --git a/src/lib/eeze/Eeze.h b/src/lib/eeze/Eeze.h
index 39096a0ce8..b44a1d0504 100644
--- a/src/lib/eeze/Eeze.h
+++ b/src/lib/eeze/Eeze.h
@@ -274,7 +274,11 @@ typedef enum
274 /** - Leds 274 /** - Leds
275 * @since 1.12 275 * @since 1.12
276 */ 276 */
277 EEZE_UDEV_TYPE_LEDS 277 EEZE_UDEV_TYPE_LEDS,
278 /** - Graphics
279 * @since 1.18
280 */
281 EEZE_UDEV_TYPE_GRAPHICS
278} Eeze_Udev_Type; 282} Eeze_Udev_Type;
279/**@}*/ 283/**@}*/
280 284
diff --git a/src/lib/eeze/eeze_udev_find.c b/src/lib/eeze/eeze_udev_find.c
index 3df74cd938..8850882938 100644
--- a/src/lib/eeze/eeze_udev_find.c
+++ b/src/lib/eeze/eeze_udev_find.c
@@ -246,6 +246,10 @@ eeze_udev_find_by_type(Eeze_Udev_Type etype,
246 udev_enumerate_add_match_subsystem(en, "leds"); 246 udev_enumerate_add_match_subsystem(en, "leds");
247 break; 247 break;
248 248
249 case EEZE_UDEV_TYPE_GRAPHICS:
250 udev_enumerate_add_match_subsystem(en, "graphics");
251 break;
252
249 default: 253 default:
250 break; 254 break;
251 } 255 }
@@ -257,6 +261,7 @@ eeze_udev_find_by_type(Eeze_Udev_Type etype,
257 devname = udev_list_entry_get_name(cur); 261 devname = udev_list_entry_get_name(cur);
258 device = udev_device_new_from_syspath(udev, devname); 262 device = udev_device_new_from_syspath(udev, devname);
259 263
264
260 if (etype == EEZE_UDEV_TYPE_IS_IT_HOT_OR_IS_IT_COLD_SENSOR) /* ensure that temp input exists somewhere in this device chain */ 265 if (etype == EEZE_UDEV_TYPE_IS_IT_HOT_OR_IS_IT_COLD_SENSOR) /* ensure that temp input exists somewhere in this device chain */
261 { 266 {
262 Eina_Bool one, two; 267 Eina_Bool one, two;
diff --git a/src/lib/eeze/eeze_udev_watch.c b/src/lib/eeze/eeze_udev_watch.c
index 5a477b92e1..bc00618473 100644
--- a/src/lib/eeze/eeze_udev_watch.c
+++ b/src/lib/eeze/eeze_udev_watch.c
@@ -257,6 +257,12 @@ _get_syspath_from_watch(void *data,
257 goto error; 257 goto error;
258 break; 258 break;
259 259
260 case EEZE_UDEV_TYPE_GRAPHICS:
261 if ((!(test = udev_device_get_subsystem(device)))
262 || (strcmp(test, "graphics")))
263 goto error;
264 break;
265
260 default: 266 default:
261 break; 267 break;
262 } 268 }
@@ -341,6 +347,10 @@ eeze_udev_watch_add(Eeze_Udev_Type type,
341 udev_monitor_filter_add_match_subsystem_devtype(mon, "drm", NULL); 347 udev_monitor_filter_add_match_subsystem_devtype(mon, "drm", NULL);
342 break; 348 break;
343 349
350 case EEZE_UDEV_TYPE_GRAPHICS:
351 udev_monitor_filter_add_match_subsystem_devtype(mon, "graphics", NULL);
352 break;
353
344 default: 354 default:
345 break; 355 break;
346 } 356 }