aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2015-03-30 10:31:56 -0400
committerChris Michael <cp.michael@samsung.com>2015-03-30 10:41:03 -0400
commit94299e2bfd01cd7c0058cd628e9764edffe2ebee (patch)
tree7883905a475a644e6168e792a91c7b9742f79763
parentecore/idler - simpler checking. (diff)
downloadefl-94299e2bfd01cd7c0058cd628e9764edffe2ebee.tar.gz
ecore_drm: use get_vt instead of parsing the tty attribute
Summary: logind has a seperate function to get the vt number. @fix Reviewers: devilhorns Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D2252
-rw-r--r--src/lib/ecore_drm/ecore_drm_logind.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/lib/ecore_drm/ecore_drm_logind.c b/src/lib/ecore_drm/ecore_drm_logind.c
index c590cf1386..d45ded726a 100644
--- a/src/lib/ecore_drm/ecore_drm_logind.c
+++ b/src/lib/ecore_drm/ecore_drm_logind.c
@@ -12,27 +12,15 @@ static inline Eina_Bool
_ecore_drm_logind_vt_get(Ecore_Drm_Device *dev)
{
int ret;
- char *tty, *p;
- ret = sd_session_get_tty(dev->session, &tty);
+ ret = sd_session_get_vt(dev->session, &dev->vt);
if (ret < 0)
{
ERR("Could not get systemd tty: %m");
return EINA_FALSE;
}
- p = strchr(tty, 't');
- dev->vt = UINT_MAX;
- if (p)
- {
- while (p[0] && (!isdigit(p[0])))
- p++;
- if (p[0])
- dev->vt = strtoul(p, NULL, 10);
- }
- free(tty);
-
- return dev->vt != UINT_MAX;
+ return EINA_TRUE;
}
#endif