Skip to content

Commit cd2a38c

Browse files
metratec-mkoehlercfriedt
authored andcommitted
logging: Fixes #96880
Now only deletes old log files if more data is needed than is available. Signed-off-by: Martin Koehler <[email protected]>
1 parent 6a3ccab commit cd2a38c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/logging/backends/log_backend_fs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ static int allocate_new_file(struct fs_file_t *file)
367367
* is not exceeded.
368368
*/
369369
while ((file_ctr >= CONFIG_LOG_BACKEND_FS_FILES_LIMIT) ||
370-
((stat.f_bfree * stat.f_frsize) <=
370+
((stat.f_bfree * stat.f_frsize) <
371371
CONFIG_LOG_BACKEND_FS_FILE_SIZE)) {
372372

373373
if (IS_ENABLED(CONFIG_LOG_BACKEND_FS_OVERWRITE)) {

0 commit comments

Comments
 (0)