summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-02-09 08:58:03 -0600
committerDerek Foreman <derekf@osg.samsung.com>2017-02-09 09:17:38 -0600
commit2800038ee212de4588471bca5d0773599b93d470 (patch)
tree0e197be8f33085c7a6d130ec385db3ab3e180bc6 /src/lib
parent9540e96107f7f6f759c3a7ed51d90a8883fc2310 (diff)
Revert "vpath usage - simplify to bare minimum to make gustavo happy"
This reverts commit 2037474dc0fd2b360452f2a15abcbe533b57ca37. This causes the wayland_shm engine to seg fault immediately at startup when attempting to create shm buffers. Please make sure when committing changes to the wayland_shm engine to test on intel, exynos, and at least one platform without dmabuf capabilities - or using the EVAS_WAYLAND_SHM_DISABLE_DMABUF env var to disable dmabuf on intel or exynos. Anyone without the time or hardware to fully test changes to wayland_shm can submit a patch to phabricator and assign it to me so I can fully test it before landing.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/efreet/efreet_base.c5
-rw-r--r--src/lib/elementary/elm_config.c28
-rw-r--r--src/lib/elput/elput_evdev.c11
3 files changed, 32 insertions, 12 deletions
diff --git a/src/lib/efreet/efreet_base.c b/src/lib/efreet/efreet_base.c
index d510cde10e..506d2e89a4 100644
--- a/src/lib/efreet/efreet_base.c
+++ b/src/lib/efreet/efreet_base.c
@@ -311,8 +311,9 @@ efreet_dirs_init(void)
311#endif 311#endif
312 312
313 /* xdg_runtime_dir */ 313 /* xdg_runtime_dir */
314 file_obj = efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS, 314 file_obj = efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS, "(:run:)/");
315 "(:run:)/"); 315 efl_vpath_file_do(file_obj);
316 efl_vpath_file_wait(file_obj);
316 xdg_runtime_dir = eina_stringshare_add(efl_vpath_file_result_get(file_obj)); 317 xdg_runtime_dir = eina_stringshare_add(efl_vpath_file_result_get(file_obj));
317 efl_del(file_obj); 318 efl_del(file_obj);
318 319
diff --git a/src/lib/elementary/elm_config.c b/src/lib/elementary/elm_config.c
index 48330cdfcf..58dd95e9e8 100644
--- a/src/lib/elementary/elm_config.c
+++ b/src/lib/elementary/elm_config.c
@@ -615,6 +615,9 @@ _elm_config_user_dir_snprintf(char *dst,
615 va_list ap; 615 va_list ap;
616 Efl_Vpath_File *file_obj; 616 Efl_Vpath_File *file_obj;
617 static int use_xdg_config = -1; 617 static int use_xdg_config = -1;
618 const char elmdir[] = "elementary";
619 const char elmdotdir[] = ".elementary";
620 const char *path = NULL;
618 621
619 if (use_xdg_config == -1) 622 if (use_xdg_config == -1)
620 { 623 {
@@ -622,15 +625,26 @@ _elm_config_user_dir_snprintf(char *dst,
622 else use_xdg_config = 0; 625 else use_xdg_config = 0;
623 } 626 }
624 if (use_xdg_config) 627 if (use_xdg_config)
625 file_obj = efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS, 628 {
626 "(:config:)/elementary"); 629 file_obj = efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS, "(:config:)/");
630 efl_vpath_file_do(file_obj);
631 efl_vpath_file_wait(file_obj);
632 path = efl_vpath_file_result_get(file_obj);
633 user_dir_len = eina_str_join_len
634 (dst, size, '/', path, strlen(path) - 1, elmdir, sizeof(elmdir) - 1);
635 efl_del(file_obj);
636 }
627 else 637 else
628 file_obj = efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS, 638 {
629 "(:home:)/.elementary"); 639 file_obj = efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS, "(:home:)/");
630 eina_strlcpy(dst, efl_vpath_file_result_get(file_obj), size); 640 efl_vpath_file_do(file_obj);
631 efl_del(file_obj); 641 efl_vpath_file_wait(file_obj);
642 path = efl_vpath_file_result_get(file_obj);
643 user_dir_len = eina_str_join_len
644 (dst, size, '/', path, strlen(path) - 1, elmdotdir, sizeof(elmdotdir) - 1);
645 efl_del(file_obj);
646 }
632 647
633 user_dir_len = strlen(dst);
634 off = user_dir_len + 1; 648 off = user_dir_len + 1;
635 if (off >= size) return off; 649 if (off >= size) return off;
636 dst[user_dir_len] = '/'; 650 dst[user_dir_len] = '/';
diff --git a/src/lib/elput/elput_evdev.c b/src/lib/elput/elput_evdev.c
index e29600ce50..8067f24783 100644
--- a/src/lib/elput/elput_evdev.c
+++ b/src/lib/elput/elput_evdev.c
@@ -60,16 +60,21 @@ _keyboard_modifiers_update(Elput_Keyboard *kbd, Elput_Seat *seat)
60static int 60static int
61_keyboard_fd_get(off_t size) 61_keyboard_fd_get(off_t size)
62{ 62{
63 const char *path;
63 Eina_Tmpstr *fullname; 64 Eina_Tmpstr *fullname;
64 long flags; 65 long flags;
65 int fd = 0; 66 int fd = 0;
67 char tmp[PATH_MAX];
66 Efl_Vpath_File *file_obj; 68 Efl_Vpath_File *file_obj;
67 69
68 file_obj = efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS, 70 file_obj = efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS, "(:run:)/");
69 "(:run:)/elput-keymap-XXXXXX"); 71 efl_vpath_file_do(file_obj);
70 fd = eina_file_mkstemp(efl_vpath_file_result_get(file_obj), &fullname); 72 efl_vpath_file_wait(file_obj);
73 path = efl_vpath_file_result_get(file_obj);
74 snprintf(tmp, sizeof(tmp), "%s/elput-keymap-XXXXXX", path);
71 efl_del(file_obj); 75 efl_del(file_obj);
72 76
77 fd = eina_file_mkstemp(tmp, &fullname);
73 if (fd < 0) return -1; 78 if (fd < 0) return -1;
74 79
75 flags = fcntl(fd, F_GETFD); 80 flags = fcntl(fd, F_GETFD);