summaryrefslogtreecommitdiff
path: root/src/lib/ecore_fb
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-01-03 12:23:43 -0200
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-01-03 12:44:54 -0200
commit5e006baacfb5d95780eae5021324f9a6bf1710df (patch)
treeb1177ade29d627955aed6cb1147649e9bd287c01 /src/lib/ecore_fb
parent806be7adc04ddfe9677e66116342762e093d80f9 (diff)
ecore_fb: allow ecore_fb to not setup VT.
Some systems won't allow VT to be setup due permissions to KDSETMODE to KD_GRAPHICS. Introduce $ECORE_FB_NO_VT envvar to allow skip that setup.
Diffstat (limited to 'src/lib/ecore_fb')
-rw-r--r--src/lib/ecore_fb/ecore_fb.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/lib/ecore_fb/ecore_fb.c b/src/lib/ecore_fb/ecore_fb.c
index eec3904f67..d11225e79f 100644
--- a/src/lib/ecore_fb/ecore_fb.c
+++ b/src/lib/ecore_fb/ecore_fb.c
@@ -41,11 +41,17 @@ nosigint(int val EINA_UNUSED)
41EAPI int 41EAPI int
42ecore_fb_init(const char *name) 42ecore_fb_init(const char *name)
43{ 43{
44 const char *s;
45
44 if (++_ecore_fb_init_count != 1) 46 if (++_ecore_fb_init_count != 1)
45 return _ecore_fb_init_count; 47 return _ecore_fb_init_count;
46 48
47 if (!ecore_fb_vt_init()) 49 s = getenv("ECORE_FB_NO_VT");
48 return --_ecore_fb_init_count; 50 if ((!s) || (atoi(s) == 0))
51 {
52 if (!ecore_fb_vt_init())
53 return --_ecore_fb_init_count;
54 }
49 55
50 if (!oldhand) 56 if (!oldhand)
51 { 57 {
@@ -69,6 +75,8 @@ ecore_fb_init(const char *name)
69EAPI int 75EAPI int
70ecore_fb_shutdown(void) 76ecore_fb_shutdown(void)
71{ 77{
78 const char *s;
79
72 if (--_ecore_fb_init_count != 0) 80 if (--_ecore_fb_init_count != 0)
73 return _ecore_fb_init_count; 81 return _ecore_fb_init_count;
74 82
@@ -77,8 +85,12 @@ ecore_fb_shutdown(void)
77 signal(SIGINT, oldhand); 85 signal(SIGINT, oldhand);
78 oldhand = NULL; 86 oldhand = NULL;
79 } 87 }
80 88
81 ecore_fb_vt_shutdown(); 89 s = getenv("ECORE_FB_NO_VT");
90 if ((!s) || (atoi(s) == 0))
91 {
92 ecore_fb_vt_shutdown();
93 }
82 94
83 return _ecore_fb_init_count; 95 return _ecore_fb_init_count;
84} 96}