forked from enlightenment/efl
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>
This commit is contained in:
parent
1d99c5b907
commit
95a494c73e
|
@ -274,7 +274,11 @@ typedef enum
|
|||
/** - Leds
|
||||
* @since 1.12
|
||||
*/
|
||||
EEZE_UDEV_TYPE_LEDS
|
||||
EEZE_UDEV_TYPE_LEDS,
|
||||
/** - Graphics
|
||||
* @since 1.18
|
||||
*/
|
||||
EEZE_UDEV_TYPE_GRAPHICS
|
||||
} Eeze_Udev_Type;
|
||||
/**@}*/
|
||||
|
||||
|
|
|
@ -246,6 +246,10 @@ eeze_udev_find_by_type(Eeze_Udev_Type etype,
|
|||
udev_enumerate_add_match_subsystem(en, "leds");
|
||||
break;
|
||||
|
||||
case EEZE_UDEV_TYPE_GRAPHICS:
|
||||
udev_enumerate_add_match_subsystem(en, "graphics");
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -257,6 +261,7 @@ eeze_udev_find_by_type(Eeze_Udev_Type etype,
|
|||
devname = udev_list_entry_get_name(cur);
|
||||
device = udev_device_new_from_syspath(udev, devname);
|
||||
|
||||
|
||||
if (etype == EEZE_UDEV_TYPE_IS_IT_HOT_OR_IS_IT_COLD_SENSOR) /* ensure that temp input exists somewhere in this device chain */
|
||||
{
|
||||
Eina_Bool one, two;
|
||||
|
|
|
@ -257,6 +257,12 @@ _get_syspath_from_watch(void *data,
|
|||
goto error;
|
||||
break;
|
||||
|
||||
case EEZE_UDEV_TYPE_GRAPHICS:
|
||||
if ((!(test = udev_device_get_subsystem(device)))
|
||||
|| (strcmp(test, "graphics")))
|
||||
goto error;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -341,6 +347,10 @@ eeze_udev_watch_add(Eeze_Udev_Type type,
|
|||
udev_monitor_filter_add_match_subsystem_devtype(mon, "drm", NULL);
|
||||
break;
|
||||
|
||||
case EEZE_UDEV_TYPE_GRAPHICS:
|
||||
udev_monitor_filter_add_match_subsystem_devtype(mon, "graphics", NULL);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue