summaryrefslogtreecommitdiff
path: root/src/lib/eina/eina_file.c
diff options
context:
space:
mode:
authorCedric BAIL <c.bail@partner.samsung.com>2014-07-14 12:54:02 +0200
committerCedric BAIL <c.bail@partner.samsung.com>2014-07-14 15:46:54 +0200
commit72aca66f8d068631edf38911b1a44c44bf96793d (patch)
tree0853d4632c0a0446b135eee7f1773d5399686c70 /src/lib/eina/eina_file.c
parentf15fc9b0a52243860273a689e372efbfeac0d332 (diff)
eina: win32 and linux version code are the same. Sharing code is better.
Diffstat (limited to 'src/lib/eina/eina_file.c')
-rw-r--r--src/lib/eina/eina_file.c51
1 files changed, 0 insertions, 51 deletions
diff --git a/src/lib/eina/eina_file.c b/src/lib/eina/eina_file.c
index 2850326..08e3a2d 100644
--- a/src/lib/eina/eina_file.c
+++ b/src/lib/eina/eina_file.c
@@ -418,57 +418,6 @@ slprintf(char *str, size_t size, const char *format, ...)
418 * Global * 418 * Global *
419 *============================================================================*/ 419 *============================================================================*/
420 420
421Eina_Bool
422eina_file_init(void)
423{
424 _eina_file_log_dom = eina_log_domain_register("eina_file",
425 EINA_LOG_COLOR_DEFAULT);
426 if (_eina_file_log_dom < 0)
427 {
428 EINA_LOG_ERR("Could not register log domain: eina_file");
429 return EINA_FALSE;
430 }
431
432 _eina_file_cache = eina_hash_string_djb2_new(NULL);
433 if (!_eina_file_cache)
434 {
435 ERR("Could not create cache.");
436 eina_log_domain_unregister(_eina_file_log_dom);
437 _eina_file_log_dom = -1;
438 return EINA_FALSE;
439 }
440
441 eina_lock_new(&_eina_file_lock_cache);
442
443 return EINA_TRUE;
444}
445
446Eina_Bool
447eina_file_shutdown(void)
448{
449 if (eina_hash_population(_eina_file_cache) > 0)
450 {
451 Eina_Iterator *it;
452 const char *key;
453
454 it = eina_hash_iterator_key_new(_eina_file_cache);
455 EINA_ITERATOR_FOREACH(it, key)
456 {
457 Eina_File *f = eina_hash_find(_eina_file_cache, key);
458 ERR("File [%s] still open %i times !", key, f->refcount);
459 }
460 eina_iterator_free(it);
461 }
462
463 eina_hash_free(_eina_file_cache);
464
465 eina_lock_free(&_eina_file_lock_cache);
466
467 eina_log_domain_unregister(_eina_file_log_dom);
468 _eina_file_log_dom = -1;
469 return EINA_TRUE;
470}
471
472static Eina_Bool 421static Eina_Bool
473_eina_file_mmap_faulty_one(void *addr, long page_size, 422_eina_file_mmap_faulty_one(void *addr, long page_size,
474 Eina_File_Map *m) 423 Eina_File_Map *m)