aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Łyszczek <michal.lyszczek@bofc.pl>2019-05-15 20:13:03 +0200
committerMichał Łyszczek <michal.lyszczek@bofc.pl>2019-05-15 20:13:03 +0200
commit8174475e45e54359d446dd6afe07aa991920330c (patch)
tree6970fe451f492a66aa74b8e45a6288eea5a40d22
parent37983a109814d4f8d2412fcbdb77908051909ab4 (diff)
downloadembedlog-8174475e45e54359d446dd6afe07aa991920330c.tar.gz
embedlog-8174475e45e54359d446dd6afe07aa991920330c.tar.bz2
embedlog-8174475e45e54359d446dd6afe07aa991920330c.zip
struct el: rename file_sync_level to fsync_level for consistency
Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
-rw-r--r--include/embedlog.h.in2
-rw-r--r--src/el-file.c2
-rw-r--r--src/el-options.c4
-rw-r--r--tst/test-el-options.c12
4 files changed, 10 insertions, 10 deletions
diff --git a/include/embedlog.h.in b/include/embedlog.h.in
index 021ae7d..0ee95f0 100644
--- a/include/embedlog.h.in
+++ b/include/embedlog.h.in
@@ -199,7 +199,7 @@ struct el
unsigned int level_current_msg:3;
#if @ENABLE_OUT_FILE@
- unsigned int file_sync_level:3;
+ unsigned int fsync_level:3;
unsigned int frotate_number;
unsigned int fcurrent_rotate;
unsigned long frotate_size;
diff --git a/src/el-file.c b/src/el-file.c
index 6f9644f..30f564c 100644
--- a/src/el-file.c
+++ b/src/el-file.c
@@ -708,7 +708,7 @@ int el_file_putb
el->written_after_sync += mlen;
if (el->written_after_sync >= el->file_sync_every ||
- el->level_current_msg <= el->file_sync_level)
+ el->level_current_msg <= el->fsync_level)
{
/* we either written enough bytes to trigger flush, or log
* level is high enough it triggers log flush to block
diff --git a/src/el-options.c b/src/el-options.c
index 3401c11..ae7ec17 100644
--- a/src/el-options.c
+++ b/src/el-options.c
@@ -164,7 +164,7 @@ static int el_vooption
case EL_FSYNC_LEVEL:
value_int = va_arg(ap, int);
VALID(EINVAL, value_int <= 7);
- el->file_sync_level = value_int;
+ el->fsync_level = value_int;
return 0;
# endif /* ENABLE_OUT_FILE */
@@ -441,7 +441,7 @@ int el_oinit
#if ENABLE_OUT_FILE
el->file_sync_every = 32768;
- el->file_sync_level = EL_FATAL;
+ el->fsync_level = EL_FATAL;
#endif
return 0;
}
diff --git a/tst/test-el-options.c b/tst/test-el-options.c
index bdcbade..8bf1c64 100644
--- a/tst/test-el-options.c
+++ b/tst/test-el-options.c
@@ -104,7 +104,7 @@ static void options_init(void)
default_el.print_newline = 1;
#if ENABLE_OUT_FILE
- default_el.file_sync_level = EL_FATAL;
+ default_el.fsync_level = EL_FATAL;
default_el.funcinfo = 0;
default_el.finfo = 0;
default_el.frotate_number = 0;
@@ -180,7 +180,7 @@ static void options_level_set(void)
========================================================================== */
-static void options_file_sync_level_set(void)
+static void options_fsync_level_set(void)
{
int i;
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
@@ -192,12 +192,12 @@ static void options_file_sync_level_set(void)
if (i <= EL_DBG)
{
mt_fail(el_option(EL_FSYNC_LEVEL, i) == 0);
- mt_fail(g_el.file_sync_level == i);
+ mt_fail(g_el.fsync_level == i);
}
else
{
mt_ferr(el_option(EL_FSYNC_LEVEL, i), EINVAL);
- mt_fail(g_el.file_sync_level == EL_DBG);
+ mt_fail(g_el.fsync_level == EL_DBG);
}
#else
mt_ferr(el_option(EL_FSYNC_LEVEL, i), ENOSYS);
@@ -538,7 +538,7 @@ static void options_global_el_after_el_cleanup(void)
default_el.print_newline = 1;
#if ENABLE_OUT_FILE
- default_el.file_sync_level = EL_FATAL;
+ default_el.fsync_level = EL_FATAL;
default_el.funcinfo = 0;
default_el.finfo = 0;
default_el.frotate_number = 0;
@@ -632,7 +632,7 @@ void el_options_test_group(void)
mt_cleanup_test = &test_cleanup;
mt_run(options_level_set);
- mt_run(options_file_sync_level_set);
+ mt_run(options_fsync_level_set);
mt_run(options_output);
mt_run(options_log_allowed);
mt_run(options_opt_print_level);