Lines Matching +full:out +full:- +full:max

4  * SPDX-License-Identifier: Apache-2.0
17 #define LOG_PREFIX_LEN (sizeof(CONFIG_LOG_BACKEND_FS_FILE_PREFIX) - 1)
56 return -ENOENT; in check_log_volume_available()
62 const char *last = path + (strlen(path) - 1); in create_log_dir()
84 len = last - path + 1; in create_log_dir()
86 len = next - path; in create_log_dir()
120 return -EIO; in check_log_file_exist()
126 rc = -EIO; in check_log_file_exist()
167 /* Check if new data overwrites max file size. in write_log_to_file()
202 file_ctr--; in write_log_to_file()
233 if (ent->type != FS_DIR_ENTRY_FILE) { in get_log_file_id()
234 return -1; in get_log_file_id()
237 len = strlen(ent->name); in get_log_file_id()
240 return -1; in get_log_file_id()
243 if (memcmp(ent->name, CONFIG_LOG_BACKEND_FS_FILE_PREFIX, LOG_PREFIX_LEN) != 0) { in get_log_file_id()
244 return -1; in get_log_file_id()
247 num = atoi(ent->name + LOG_PREFIX_LEN); in get_log_file_id()
253 return -1; in get_log_file_id()
277 int max = 0, min = MAX_FILE_NUMERAL; in allocate_new_file() local
290 if (file_num > max) { in allocate_new_file()
291 max = file_num; in allocate_new_file()
304 ((max - min) > in allocate_new_file()
308 oldest = max; in allocate_new_file()
325 if (file_num > max - CONFIG_LOG_BACKEND_FS_FILES_LIMIT) { in allocate_new_file()
332 newest = max; in allocate_new_file()
338 goto out; in allocate_new_file()
348 goto out; in allocate_new_file()
360 goto out; in allocate_new_file()
383 /* Check if there is enough space to write file or max files number in allocate_new_file()
393 goto out; in allocate_new_file()
399 goto out; in allocate_new_file()
402 return -ENOSPC; in allocate_new_file()
412 goto out; in allocate_new_file()
417 out: in allocate_new_file()
432 if ((rc == 0) || (rc == -ENOENT)) { in del_oldest_log()
439 --file_ctr; in del_oldest_log()
488 log_output_func(&log_output, &msg->log, flags); in process()