aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Łyszczek <michal.lyszczek@bofc.pl>2019-05-15 20:16:10 +0200
committerMichał Łyszczek <michal.lyszczek@bofc.pl>2019-05-15 20:16:10 +0200
commitefc3fd0d4c2afcf34bdf55a6760d6e041c7f7ece (patch)
tree454c79a129c79ace0b6433b50440490d7fa67c02
parent8174475e45e54359d446dd6afe07aa991920330c (diff)
downloadembedlog-efc3fd0d4c2afcf34bdf55a6760d6e041c7f7ece.tar.gz
embedlog-efc3fd0d4c2afcf34bdf55a6760d6e041c7f7ece.tar.bz2
embedlog-efc3fd0d4c2afcf34bdf55a6760d6e041c7f7ece.zip
struct el: rename file_sync_every to fsync_every 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.c4
4 files changed, 6 insertions, 6 deletions
diff --git a/include/embedlog.h.in b/include/embedlog.h.in
index 0ee95f0..00e1fbe 100644
--- a/include/embedlog.h.in
+++ b/include/embedlog.h.in
@@ -203,7 +203,7 @@ struct el
unsigned int frotate_number;
unsigned int fcurrent_rotate;
unsigned long frotate_size;
- unsigned long file_sync_every;
+ unsigned long fsync_every;
unsigned long written_after_sync;
unsigned long fpos;
FILE *file;
diff --git a/src/el-file.c b/src/el-file.c
index 30f564c..720eb0d 100644
--- a/src/el-file.c
+++ b/src/el-file.c
@@ -707,7 +707,7 @@ int el_file_putb
el->fpos += mlen;
el->written_after_sync += mlen;
- if (el->written_after_sync >= el->file_sync_every ||
+ if (el->written_after_sync >= el->fsync_every ||
el->level_current_msg <= el->fsync_level)
{
/* we either written enough bytes to trigger flush, or log
diff --git a/src/el-options.c b/src/el-options.c
index ae7ec17..33b1d45 100644
--- a/src/el-options.c
+++ b/src/el-options.c
@@ -337,7 +337,7 @@ static int el_vooption
case EL_FSYNC_EVERY:
value_long = va_arg(ap, long);
VALID(EINVAL, value_long >= 0);
- el->file_sync_every = value_long;
+ el->fsync_every = value_long;
return 0;
# endif /* ENABLE_OUT_FILE */
@@ -440,7 +440,7 @@ int el_oinit
#endif
#if ENABLE_OUT_FILE
- el->file_sync_every = 32768;
+ el->fsync_every = 32768;
el->fsync_level = EL_FATAL;
#endif
return 0;
diff --git a/tst/test-el-options.c b/tst/test-el-options.c
index 8bf1c64..beb5230 100644
--- a/tst/test-el-options.c
+++ b/tst/test-el-options.c
@@ -112,7 +112,7 @@ static void options_init(void)
default_el.frotate_size = 0;
default_el.fpos = 0;
default_el.file = NULL;
- default_el.file_sync_every = 32768;
+ default_el.fsync_every = 32768;
default_el.fname = NULL;
#endif
@@ -546,7 +546,7 @@ static void options_global_el_after_el_cleanup(void)
default_el.frotate_size = 0;
default_el.fpos = 0;
default_el.file = NULL;
- default_el.file_sync_every = 32768;
+ default_el.fsync_every = 32768;
default_el.fname = NULL;
#endif