Mike Blumenkrantz (zmike/discomfitor) <michael.blumenkrantz@gmail.com>
Jérôme Pinot <ngc891@gmail.com>
Daniel Willmann <d.willmann@samsung.com>
+Jérémy Zurcher <jeremy@asynk.ch>
* Don't stop on limited access right.
2012-10-03 Daniel Willmann
+
* Fix memory corruption by allocating enough memory in
eio_eet_data_read_cipher().
+
+2012-11-23 Sebastian Dransfeld
+
+ * Correctly define alloca
+ * Minor build fixes for solaris
+
+2012-12-07 Cedric Bail
+
+ * Don't leak fd on exec.
+ * Don't stop on limited access right.
+
+2012-12-07 Luis Felipe Strano Moraes
+
+ * 1.7.3 release
+
+2012-12-12 Mike Blumenkrantz
+
+ * Fixed crash in eio_monitor_del.
+
+2012-12-14 Cedric Bail
+
+ * Properly destroy fd on exec.
+
+2012-12-17 Vincent Torri
+
+ * Add XML output to doc
+ * Add installation rule for doc
+
+2012-12-21 Luis Felipe Strano Moraes
+
+ * 1.7.4 release
+
+2012-12-24 Mike Blumenkrantz
+
+ * eio functions no longer crash when passed NULL and throw errors accordingly
+
+2013-01-03 Jérémy Zurcher
+
+ * Add eio_eet_sync symbol.
+
+2013-01-04 Luis Felipe Strano Moraes
+
+ * 1.7.5 release
+
+2013-01-14 Cedric Bail
+
+ * Fix wrong initialization of container in eio_file_map_new.
Eio 1.8.0
+Eio 1.7.6
+
+Changes since Eio 1.7.5:
+------------------------
+
+Fixes:
+ * Fix wrongly set container in eio_file_map_new.
+
+Eio 1.7.5
+
+Changes since Eio 1.7.4:
+------------------------
+
+Add:
+ * Add eio_eet_sync symbol.
+
+Fixes:
+ * Functions no longer crash when passed NULL and throw errors accordingly
+
+Eio 1.7.4
+
+Changes since Eio 1.7.3:
+------------------------
+
+Fixes:
+ - Fixed crash in eio_monitor_del.
+ - Properly destroy fd on exec.
+
+Eio 1.7.3
+
+Changes since Eio 1.7.2:
+------------------------
+
+Fixes:
+ - Fix build on Solaris.
+ - Don't leak fd on exec.
+ - Don't stop on limited access right.
+
+Eio 1.7.2
+
Changes since Eio 1.7.0:
-------------------------
Eio 1.7.0
+Fixes:
+ - Fix memory corruption by allocating enough memory in
+ eio_eet_data_read_cipher().
+
Changes since Eio 1.0.0:
-------------------------
AC_SUBST(lt_enable_auto_import)
### Checks for library functions
-AC_CHECK_FUNCS([fchmod chown getpwnam getgrnam])
+AC_CHECK_FUNCS([fchmod chown getpwnam getgrnam fcntl])
### Check for splice system call
* @param data Unmodified user data passed to callbacks
* @return NULL in case of a failure.
*
- * This function will call eet_flush() from another thread. As long as the done_cb or
+ * This function will call eet_sync() from another thread. As long as the done_cb or
* error_cb haven't be called, you must keep @p ef open.
*/
EAPI Eio_File *eio_eet_sync(Eet_File *ef,
}
EAPI Eio_File *
+eio_eet_sync(Eet_File *ef,
+ Eio_Done_Cb done_cb,
+ Eio_Eet_Error_Cb error_cb,
+ const void *data)
+{
+ return eio_eet_flush(ef,done_cb,error_cb,data);
+}
+
+EAPI Eio_File *
eio_eet_data_write_cipher(Eet_File *ef,
Eet_Data_Descriptor *edd,
const char *name,
const char *key,
const void *data, Eina_Free_Cb free_cb)
{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ls, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(key, EINA_FALSE);
/* FIXME: Check if we are in the right worker thred */
if (!ls->worker.associated)
ls->worker.associated = eina_hash_string_small_new(eio_associate_free);
const char *key,
const void *data, Eina_Free_Cb free_cb)
{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ls, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(key, EINA_FALSE);
/* FIXME: Check if we are in the right worker thred */
if (!ls->worker.associated)
ls->worker.associated = eina_hash_string_small_new(eio_associate_free);
{
Eio_File_Associate *search;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ls, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(key, NULL);
if (!ls->main.associated)
return NULL;
* License along with this library;
* if not, see <http://www.gnu.org/licenses/>.
*/
+
#include "eio_private.h"
#include "Eio.h"
map = malloc(sizeof (Eio_File_Map_Rule));
EINA_SAFETY_ON_NULL_RETURN_VAL(map, NULL);
- map->common.container = f;
+ map->file = f;
map->filter_cb = filter_cb;
map->map_cb = map_cb;
map->rule = rule;
const char *tmp;
Eio_Monitor *ret;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(path, NULL);
tmp = eina_stringshare_add(path);
ret = eio_monitor_stringshared_add(tmp);
eina_stringshare_del(tmp);
Eio_Monitor *monitor;
struct stat st;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(path, NULL);
if (_monitor_pid == -1) return NULL;
if (_monitor_pid != getpid())
EAPI void
eio_monitor_del(Eio_Monitor *monitor)
{
+ if (!monitor) return;
EINA_REFCOUNT_UNREF(monitor)
_eio_monitor_free(monitor);
}
void eio_monitor_backend_init(void)
{
int fd;
+#ifdef HAVE_FCNTL
+ int flags;
+#endif
fd = inotify_init();
if (fd < 0)
return ;
+#ifdef HAVE_FCNTL
+ flags = fcntl(fd, F_GETFD);
+ flags |= FD_CLOEXEC;
+ fcntl(fd, F_SETFD, flags);
+#endif
+
_inotify_fdh = ecore_main_fd_handler_add(fd, ECORE_FD_READ, _eio_inotify_handler, NULL, NULL, NULL);
if (!_inotify_fdh)
{
* License along with this library;
* if not, see <http://www.gnu.org/licenses/>.
*/
+
#include "eio_private.h"
#include "Eio.h"
{
Eio_File_Stat *s = NULL;
- if (!path || !done_cb || !error_cb)
- return NULL;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(path, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(done_cb, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(error_cb, NULL);
s = malloc(sizeof (Eio_File_Stat));
if (!s) return NULL;
#ifdef HAVE_LSTAT
Eio_File_Stat *s = NULL;
- if (!path || !done_cb || !error_cb)
- return NULL;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(path, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(done_cb, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(error_cb, NULL);
s = malloc(sizeof (Eio_File_Stat));
if (!s) return NULL;
{
Eio_File_Unlink *l = NULL;
- if (!path || !done_cb || !error_cb)
- return NULL;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(path, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(done_cb, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(error_cb, NULL);
l = malloc(sizeof (Eio_File_Unlink));
if (!l) return NULL;
{
Eio_File_Mkdir *r = NULL;
- if (!path || !done_cb || !error_cb)
- return NULL;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(path, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(done_cb, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(error_cb, NULL);
r = malloc(sizeof (Eio_File_Mkdir));
if (!r) return NULL;
{
Eio_File_Mkdir *r = NULL;
- if (!path || !done_cb || !error_cb)
- return NULL;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(path, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(done_cb, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(error_cb, NULL);
r = malloc(sizeof (Eio_File_Mkdir));
if (!r) return NULL;
{
Eio_File_Chown *c = NULL;
- if (!path || !done_cb || !error_cb)
- return NULL;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(path, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(done_cb, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(error_cb, NULL);
c = malloc(sizeof (Eio_File_Chown));
if (!c) return NULL;
{
Eio_File_Xattr *async;
- if (!path || !attribute || !done_cb || !error_cb)
- return NULL;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(path, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(attribute, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(done_cb, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(error_cb, NULL);
async = malloc(sizeof (Eio_File_Xattr));
if (!async) return NULL;
{
Eio_File_Xattr *async;
- if (!path || !attribute || !done_cb || !error_cb)
- return NULL;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(path, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(attribute, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(done_cb, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(error_cb, NULL);
async = malloc(sizeof (Eio_File_Xattr));
if (!async) return NULL;
{
Eio_File_Xattr *async;
- if (!path || !attribute || !done_cb || !error_cb)
- return NULL;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(path, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(attribute, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(done_cb, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(error_cb, NULL);
async = malloc(sizeof (Eio_File_Xattr));
if (!async) return NULL;
{
Eio_File_Xattr *async;
- if (!path || !attribute || !done_cb || !error_cb)
- return NULL;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(path, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(attribute, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(done_cb, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(error_cb, NULL);
async = malloc(sizeof (Eio_File_Xattr));
if (!async) return NULL;
{
Eio_File_Xattr *async;
- if (!path || !attribute || !done_cb || !xattr_data || !xattr_size || !error_cb)
- return NULL;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(path, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(attribute, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(done_cb, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(xattr_data, NULL);
+ EINA_SAFETY_ON_FALSE_RETURN_VAL(xattr_size, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(error_cb, NULL);
async = malloc(sizeof (Eio_File_Xattr) + xattr_size);
if (!async) return NULL;
Eio_File_Xattr *async;
int length;
- if (!path || !attribute || !done_cb || !xattr_string || !error_cb)
- return NULL;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(path, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(attribute, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(xattr_string, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(done_cb, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(error_cb, NULL);
async = malloc(sizeof (Eio_File_Xattr));
if (!async) return NULL;
{
Eio_File_Xattr *async;
- if (!path || !attribute || !done_cb || !error_cb)
- return NULL;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(path, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(attribute, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(done_cb, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(error_cb, NULL);
async = malloc(sizeof (Eio_File_Xattr));
if (!async) return NULL;
{
Eio_File_Xattr *async;
- if (!path || !attribute || !done_cb || !error_cb)
- return NULL;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(path, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(attribute, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(done_cb, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(error_cb, NULL);
async = malloc(sizeof (Eio_File_Xattr));
if (!async) return NULL;