diff options
Diffstat (limited to 'src/libnetdata/aral/aral.c')
-rw-r--r-- | src/libnetdata/aral/aral.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libnetdata/aral/aral.c b/src/libnetdata/aral/aral.c index 64b63d8e0..2ec27b3df 100644 --- a/src/libnetdata/aral/aral.c +++ b/src/libnetdata/aral/aral.c @@ -72,7 +72,7 @@ struct aral { struct { bool enabled; const char *filename; - char **cache_dir; + const char **cache_dir; } mmap; } config; @@ -117,7 +117,7 @@ size_t aral_structures(ARAL *ar) { return aral_structures_from_stats(ar->stats); } -struct aral_statistics *aral_statistics(ARAL *ar) { +struct aral_statistics *aral_get_statistics(ARAL *ar) { return ar->stats; } @@ -709,7 +709,7 @@ size_t aral_element_size(ARAL *ar) { } ARAL *aral_create(const char *name, size_t element_size, size_t initial_page_elements, size_t max_page_size, - struct aral_statistics *stats, const char *filename, char **cache_dir, bool mmap, bool lockless) { + struct aral_statistics *stats, const char *filename, const char **cache_dir, bool mmap, bool lockless) { ARAL *ar = callocz(1, sizeof(ARAL)); ar->config.options = (lockless) ? ARAL_LOCKLESS : 0; ar->config.requested_element_size = element_size; @@ -799,6 +799,7 @@ ARAL *aral_create(const char *name, size_t element_size, size_t initial_page_ele aral_delete_leftover_files(ar->config.name, directory_name, file); } + errno_clear(); internal_error(true, "ARAL: '%s' " "element size %zu (requested %zu bytes), " @@ -1078,7 +1079,7 @@ int aral_stress_test(size_t threads, size_t elements, size_t seconds) { } int aral_unittest(size_t elements) { - char *cache_dir = "/tmp/"; + const char *cache_dir = "/tmp/"; struct aral_unittest_config auc = { .single_threaded = true, |