Don't cache the file size 55/243155/3
authorMateusz Majewski <m.majewski2@samsung.com>
Thu, 3 Sep 2020 09:50:16 +0000 (11:50 +0200)
committerMichal Bloch <m.bloch@partner.samsung.com>
Tue, 8 Sep 2020 07:17:27 +0000 (07:17 +0000)
commit3ca87bd7c0fe1c6dab4307f0a58cbee1d249e11c
treefdd7d2e9d454cf2cbf76ebc4999760faf8b4ebe0
parentd6cd724121311b6af67b0a51c9260405891a2c6b
Don't cache the file size

Little point in caching the file size if you are going to update it
before using anyway.

Yes, in some edge cases, the accurate size might be unavailable, but I
don't think that there are many cases in which we can't check the file
size, but we can write to it. More importantly, the cached value was
wrong anyway, since log_print_log_line has been returning hogwash
instead of an accurate written byte count for some time.

Change-Id: I73d8b6d757ac0cd6574b66349ac2e8054bb15aaa
include/log_file.h
src/logger/reader_pipe.c
src/shared/log_file.c
src/tests/log_file.c