Commit Graph

38 Commits

Author SHA1 Message Date
Mike Blumenkrantz ce15918593 ecore-file: use hash for finding monitors
this should hugely improve the speed of file monitor event processing;
in my test case, 800,000+ monitors were present and the application was
entirely unable to process them
2015-04-09 20:01:18 -04:00
Carsten Haitzler 4e716fb779 ecore_file - fix nasty memory issues in ecore_file_app_exe_get()
valgrind was most unhappy with ecore_file_app_exe_get(). like:

==8331== Invalid write of size 1
==8331==    at 0x68DE90A: ecore_file_app_exe_get (ecore_file.c:994)
==8331==  Address 0x1348e58f is 0 bytes after a block of size 31 alloc'd
==8331==    at 0x4C28C20: malloc (vg_replace_malloc.c:296)
==8331== Invalid write of size 1
==8331==    at 0x68DE948: ecore_file_app_exe_get (ecore_file.c:1000)
==8331==  Address 0x1348e599 is 10 bytes after a block of size 31 alloc'd
==8331==    at 0x4C28C20: malloc (vg_replace_malloc.c:296)

etc. etc. - so i rewrote it cleanly using strbuf to save code and
effort. cleaner now and ACTUALLY works correctly... and no valgrind
complaints.

@fix
2015-04-01 09:37:27 +09:00
kabeer khan 9c26b572d0 ecore_file : Changed documentation of ecore_file_mksubdirs
Summary:
Corrected documentation of ecore_file_mksubdirs by replacing dirs with subdirs

Signed-off-by: kabeer khan <kabeer.khan@samsung.com>

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1674
2014-11-21 09:17:31 -05:00
kabeer khan 0abcd5133e Ecore File: Corrected documentation of ecore_file_monitor_add API
Summary:
Added condition that if given path does not exist it returns NULL

@fix

Signed-off-by: kabeer khan <kabeer.khan@samsung.com>

Reviewers: englebass, devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1640
2014-11-04 08:53:33 -05:00
kabeer khan 61d2e8cdf6 Ecore File: Corrected documentation of ecore_file_monitor_add API
Summary:
Existing doc specifies that ecore_file_monitor_add returns NULL if path is not file.
Removed this line as it works if path is either file or directory.

Signed-off-by: kabeer khan <kabeer.khan@samsung.com>

Reviewers: devilhorns, englebass

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1635
2014-11-03 08:13:57 -05:00
Chris Michael fc2fbcc7b8 ecore-file: Fix formatting
Summary: No functional changes, just formatting

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-11-03 08:13:32 -05:00
Chris Michael ff2f1e086a ecore-file: Fix formatting.
Summary: No functional changes, just formatting

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-11-03 08:13:32 -05:00
Jean-Philippe Andre 8d9c6c0a00 inotify: Fix safety after read in 3 places
Fixes Coverity issues:
 - CID 1039565
 - CID 1039566
2014-10-28 10:54:51 +09:00
Pierre Le Magourou 42a7d9b71c ecore_file: remove ecore_file_ls_iterator function from header.
It has no implementation in the ecore_file.c file.
This has been forgotten in commit d4059c7 when moving this function to
Eina library.
2014-10-20 18:17:26 +02:00
Stefan Schmidt 40b395666b ecore_file: Check return value of chmod()
Handle the error case here if chmod() fails.

CID: 1039696
2014-08-08 11:28:57 +02:00
Cedric BAIL 2d4fc8838d ecore_file: this parameter is indeed not used. 2014-06-27 13:41:39 +02:00
Carsten Haitzler 555df8f510 Revert "fix allocator sizeof operand mismatch reported by clang"
This reverts commit 955cc579d4.

why? wrong. no. and it breaks actual execution/functioning. segv land
2014-01-09 10:02:26 +09:00
Jihoon Kim 955cc579d4 fix allocator sizeof operand mismatch reported by clang
https://build.enlightenment.org/job/nightly_efl_clang_x86_64/lastSuccessfulBuild/artifact/scan-build/build/2014-01-07-1/report-QL6MiM.html#EndPath
https://build.enlightenment.org/job/nightly_efl_clang_x86_64/lastSuccessfulBuild/artifact/scan-build/build/2014-01-07-1/report-a2l0Ci.html#EndPath
https://build.enlightenment.org/job/nightly_efl_clang_x86_64/lastSuccessfulBuild/artifact/scan-build/build/2014-01-07-1/report-McvqNf.html#EndPath
2014-01-09 09:10:02 +09:00
Daniel Juyung Seo 76d8532b54 efl: Unified eina critical manro to CRI.
Being annoyed by different types of eina critical macros - CRI, CRIT,
 CRITICAL -, I concluded to unify them to one. Discussed on IRC and
 finally, CRI was chosen to meet the consistency with other macros -
 ERR, WRN, INF, DBG - in terms of the number of characters.
If there is any missing bits, please let me know.
2013-12-26 12:27:13 +09:00
Sebastian Dransfeld 35240d979a ecore: remove dead free
Since we now free exe on goto restart, exe will always be NULL.

CID 1139955
2013-12-23 13:39:47 +01:00
Carsten Haitzler f1fa8de149 ecore-file - fix mem leak in ecore_file_app_exe_get() on restart
this actually fixes the issue. coverity did point it out but i fixed
it incorrectly. since it was still there in the scan i now fixed it
properly. fixes CID 1039279
2013-12-15 11:18:38 +09:00
Carsten Haitzler f8b5dcf126 ecore_file - finding exe path - if HOME is not set a leak could happen
this fixes CID 1039279
2013-12-13 21:26:05 +09:00
Sebastian Dransfeld 752d627a93 ecore_x: Fix buffer overrun
Use strncpy to prevent buffer overrun on buf, and '\0' terminate.

Fixes CID 1039584
2013-12-07 21:11:34 +01:00
Jihoon Kim 49511730d7 fix unchecked return value of stat in ecore_file_mv
stat() function may fail and return an error code

This fixes CID 1039697
2013-12-02 09:40:48 +09:00
Oleksandr Shcherbina 1cad4c2afe ecore/ecore_file: NULL-check for input parameter
Add check by NULL for input parameter 'path' in method ecore_file_mkpath

Reviewers: seoz, Hermet

CC: cedric

Differential Revision: https://phab.enlightenment.org/D349
2013-11-30 13:50:17 +09:00
Ryuan Choi 2f322e1273 ecore_file: Print more informative message when inotify_add_watch was failed.
inotify_add_watch can be failed because of several reasons.
2013-11-25 19:21:52 +09:00
Cedric Bail 48b0f8515a ecore_file: fix left over borking.
I think I teached raster well, my job here is done !
2013-10-15 10:21:03 +09:00
Carsten Haitzler ea9963f469 ecore-file - remove ifdefs for HAVE_CULR since ecore-con "always" has it
now that it's runtime dlopen'ed etc. ecore-con "always" has url
support via curl so ecore-file needs to assume that this can always
work and this just use ecore-con-url anyway.
2013-10-15 09:16:26 +09:00
Chris Michael 4c9c522337 Check for valid fd returned from ecore_main_fd_handler_fd_get before
potentially passing -1 to the read() function.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-05 11:40:02 +01:00
Chris Michael 65fc207951 Don't pass negative values to close:
ecore_main_fd_handler_fd_get can return -1, so check return value
before passing to close().

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-05 11:36:24 +01:00
Chris Michael 62401c257a strchr can return NULL, so check validity before tryint to pass NULL
to ecore_file_cp.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-05 10:37:15 +01:00
Carsten Haitzler 4451625301 fix clang sizeof complaint 2013-07-16 20:45:24 +09:00
Cedric Bail 8d5e33077e efl: use HAVE_FCNTL around call to fcntl. 2013-03-10 23:10:27 +09:00
Ivan Briano 61b8e2aefe More removal of \r 2013-02-17 14:53:25 -03:00
Sanjeev BA 7b55dc5135 Remove redundant return statement.
Signed-off-by: Sanjeev BA <iamsanjeev@gmail.com>

SVN revision: 83454
2013-01-30 00:27:28 +00:00
Gustavo Sverzut Barbieri 0a2d116119 efl: eina_alloca.h to simplify alloca() usage.
having to replicate 18 lines per file just to access alloca() is
insane. Let's do that in Eina.h and avoid that crap :-/



SVN revision: 82082
2013-01-03 15:10:34 +00:00
Mike Blumenkrantz b2de05f49a all efl object deletion functions now take NULL without crashing or erroring
SVN revision: 81667
2012-12-24 09:35:56 +00:00
Jonas M. Gastal e3ae81e65f efl: Created Ecore group and added existing Ecore groups to it.
SVN revision: 81293
2012-12-18 18:38:44 +00:00
Cedric BAIL 88ba56d9d5 efl: don't leak fd on exec.
SVN revision: 80434
2012-12-07 11:01:41 +00:00
Gustavo Sverzut Barbieri 62bb4646c9 efl/ecore_file: refactor to be more like eio in providing backends.
instead of the previous mess, just define the functions with common
names and call the backend that was compiled in, similar to what eio
does.

also do not be silent on errors, use eina_safety_checks to issue warnings.



SVN revision: 80360
2012-12-06 13:38:34 +00:00
Gustavo Sverzut Barbieri 6a5eaacc6a efl: common inotify checks, simplified.
Another try to make inotify checks more common.

This time uses AC_CHECK_HEADERS() as for others, that already define
HAVE_SYS_INOTIFY_H, then uses that.

I still kept AM_CONDITIONAL([HAVE_INOTIFY]) because I plan to convert
ecore_file to the same, smarter, method that is used in eio (compiling
the file depending on the backend.



SVN revision: 80358
2012-12-06 13:02:59 +00:00
Vincent Torri dc0c272d2f ecore: remove useless ECORE_HAVE_EET, remove old XCB code and remove BUILD_ECORE_CON checks as ecore_con is always compiled anyway
SVN revision: 80024
2012-12-03 08:35:53 +00:00
Vincent Torri 7d6010b12c merge: add escape ecore, fix several bugs
SVN revision: 79995
2012-12-02 22:35:45 +00:00