summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm/ecore_drm.c
diff options
context:
space:
mode:
authorSeunghun Lee <shiin.lee@samsung.com>2014-12-09 09:36:42 -0500
committerChris Michael <cp.michael@samsung.com>2014-12-09 09:36:42 -0500
commitb10ab1a86f35ab793ba6efb49224d9ecdd1b7dbd (patch)
treea29763a81807d24d4a994dfff9b7098a02e22e45 /src/lib/ecore_drm/ecore_drm.c
parent05006e64634359613e093776af19e7b9ca0caec1 (diff)
ecore-drm: added drm launcher that is allow to determine whether to launch with logind or root privilege.
Summary: - allow to launch drm backend without systemd-logind with root privilege. - allow to open drm device node via logind, not directly open it, in case exist systemd-logind. - fixes issue that couldn't switch session, because ecore-drm couldn't drop master to drm device with no permission. (allow to switch session appropriate.) Reviewers: gwanglim, devilhorns Subscribers: torori, cedric Differential Revision: https://phab.enlightenment.org/D1704
Diffstat (limited to 'src/lib/ecore_drm/ecore_drm.c')
-rw-r--r--src/lib/ecore_drm/ecore_drm.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/lib/ecore_drm/ecore_drm.c b/src/lib/ecore_drm/ecore_drm.c
index c341c197d2..6413270a08 100644
--- a/src/lib/ecore_drm/ecore_drm.c
+++ b/src/lib/ecore_drm/ecore_drm.c
@@ -6,7 +6,6 @@
6 6
7/* local variables */ 7/* local variables */
8static int _ecore_drm_init_count = 0; 8static int _ecore_drm_init_count = 0;
9static char *sid;
10 9
11/* external variables */ 10/* external variables */
12int _ecore_drm_log_dom = -1; 11int _ecore_drm_log_dom = -1;
@@ -65,12 +64,6 @@ ecore_drm_init(void)
65 if (!eina_log_domain_level_check(_ecore_drm_log_dom, EINA_LOG_LEVEL_DBG)) 64 if (!eina_log_domain_level_check(_ecore_drm_log_dom, EINA_LOG_LEVEL_DBG))
66 eina_log_domain_level_set("ecore_drm", EINA_LOG_LEVEL_DBG); 65 eina_log_domain_level_set("ecore_drm", EINA_LOG_LEVEL_DBG);
67 66
68 /* get sd-login properties we need */
69 if (sd_pid_get_session(getpid(), &sid) < 0) goto sd_err;
70
71 /* try to init dbus */
72 if (!_ecore_drm_dbus_init(sid)) goto dbus_err;
73
74 /* try to init eeze */ 67 /* try to init eeze */
75 if (!eeze_init()) goto eeze_err; 68 if (!eeze_init()) goto eeze_err;
76 69
@@ -78,10 +71,6 @@ ecore_drm_init(void)
78 return _ecore_drm_init_count; 71 return _ecore_drm_init_count;
79 72
80eeze_err: 73eeze_err:
81 _ecore_drm_dbus_shutdown();
82dbus_err:
83 free(sid);
84sd_err:
85 eina_log_domain_unregister(_ecore_drm_log_dom); 74 eina_log_domain_unregister(_ecore_drm_log_dom);
86 _ecore_drm_log_dom = -1; 75 _ecore_drm_log_dom = -1;
87log_err: 76log_err:
@@ -115,9 +104,6 @@ ecore_drm_shutdown(void)
115 /* close eeze */ 104 /* close eeze */
116 eeze_shutdown(); 105 eeze_shutdown();
117 106
118 /* cleanup dbus */
119 _ecore_drm_dbus_shutdown();
120
121 /* shutdown ecore_event */ 107 /* shutdown ecore_event */
122 ecore_event_shutdown(); 108 ecore_event_shutdown();
123 109
@@ -131,8 +117,6 @@ ecore_drm_shutdown(void)
131 /* shutdown eina */ 117 /* shutdown eina */
132 eina_shutdown(); 118 eina_shutdown();
133 119
134 free(sid);
135
136 /* return init count */ 120 /* return init count */
137 return _ecore_drm_init_count; 121 return _ecore_drm_init_count;
138} 122}