barbieri pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=5e006baacfb5d95780eae5021324f9a6bf1710df

commit 5e006baacfb5d95780eae5021324f9a6bf1710df
Author: Gustavo Sverzut Barbieri <barbi...@profusion.mobi>
Date:   Tue Jan 3 12:23:43 2017 -0200

    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.
---
 src/lib/ecore_fb/ecore_fb.c | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/src/lib/ecore_fb/ecore_fb.c b/src/lib/ecore_fb/ecore_fb.c
index eec3904..d11225e 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)
 EAPI int
 ecore_fb_init(const char *name)
 {
+   const char *s;
+
    if (++_ecore_fb_init_count != 1)
       return _ecore_fb_init_count;
 
-   if (!ecore_fb_vt_init())
-      return --_ecore_fb_init_count;
+   s = getenv("ECORE_FB_NO_VT");
+   if ((!s) || (atoi(s) == 0))
+     {
+        if (!ecore_fb_vt_init())
+          return --_ecore_fb_init_count;
+     }
 
    if (!oldhand)
      {
@@ -69,6 +75,8 @@ ecore_fb_init(const char *name)
 EAPI int
 ecore_fb_shutdown(void)
 {
+   const char *s;
+
    if (--_ecore_fb_init_count != 0)
       return _ecore_fb_init_count;
 
@@ -77,8 +85,12 @@ ecore_fb_shutdown(void)
         signal(SIGINT, oldhand);
         oldhand = NULL;
      }
-   
-   ecore_fb_vt_shutdown();
+
+   s = getenv("ECORE_FB_NO_VT");
+   if ((!s) || (atoi(s) == 0))
+     {
+        ecore_fb_vt_shutdown();
+     }
 
    return _ecore_fb_init_count;
 }

-- 


Reply via email to