summaryrefslogtreecommitdiff
path: root/src/lib/elput
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-02-10 08:58:29 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-02-10 19:27:15 +0900
commit0356b1eb5ebcfed8d4f080eab11ac40e3a53f068 (patch)
treeef81493a8a673f14d1a27bf50b95b874b0b0324c /src/lib/elput
parent7cc8f085b86e7172155912b53c423ba8990a6d60 (diff)
vpath usage - simplify to bare minimum to make gustavo happy
since these are only local path resolves, the do and wait are technically not needed. also remove any other tmp strings and use the vpath string resolving feature to avoid printfs/strjoins/cats etc. etc. as well. also remember to remove old name string from evas shm code - it worked for me. i guess i was lucky and it happened to be NULL thus free was fine.
Diffstat (limited to 'src/lib/elput')
-rw-r--r--src/lib/elput/elput_evdev.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/lib/elput/elput_evdev.c b/src/lib/elput/elput_evdev.c
index 8067f24783..e29600ce50 100644
--- a/src/lib/elput/elput_evdev.c
+++ b/src/lib/elput/elput_evdev.c
@@ -60,21 +60,16 @@ _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;
64 Eina_Tmpstr *fullname; 63 Eina_Tmpstr *fullname;
65 long flags; 64 long flags;
66 int fd = 0; 65 int fd = 0;
67 char tmp[PATH_MAX];
68 Efl_Vpath_File *file_obj; 66 Efl_Vpath_File *file_obj;
69 67
70 file_obj = efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS, "(:run:)/"); 68 file_obj = efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS,
71 efl_vpath_file_do(file_obj); 69 "(:run:)/elput-keymap-XXXXXX");
72 efl_vpath_file_wait(file_obj); 70 fd = eina_file_mkstemp(efl_vpath_file_result_get(file_obj), &fullname);
73 path = efl_vpath_file_result_get(file_obj);
74 snprintf(tmp, sizeof(tmp), "%s/elput-keymap-XXXXXX", path);
75 efl_del(file_obj); 71 efl_del(file_obj);
76 72
77 fd = eina_file_mkstemp(tmp, &fullname);
78 if (fd < 0) return -1; 73 if (fd < 0) return -1;
79 74
80 flags = fcntl(fd, F_GETFD); 75 flags = fcntl(fd, F_GETFD);