删除通过freeram大小内存更新
This commit is contained in:
parent
48f0fe0038
commit
52c901deae
@ -203,7 +203,7 @@ OSP_STATUS osp_update_log(uint32_t len, uint32_t logid, uint32_t msg_type)
|
|||||||
char msg_name[10] = {0};
|
char msg_name[10] = {0};
|
||||||
int32_t file_idx = 0;
|
int32_t file_idx = 0;
|
||||||
uint32_t type = 0;
|
uint32_t type = 0;
|
||||||
uint32_t ulfreeram = 0;
|
//uint32_t ulfreeram = 0;
|
||||||
|
|
||||||
if (logid >= MAX_LOG_CFG_NUM || logid < 0)
|
if (logid >= MAX_LOG_CFG_NUM || logid < 0)
|
||||||
{
|
{
|
||||||
@ -225,12 +225,12 @@ OSP_STATUS osp_update_log(uint32_t len, uint32_t logid, uint32_t msg_type)
|
|||||||
UCP_PRINT_LOG("osp_update_log logid:%d type:0x%x cur_sum_len:%u max_file_size_M:%u !\n", logid,type, p_log_file_cfg[logid][type].cur_sum_len, p_log_file_cfg[logid][type].max_file_size_M);
|
UCP_PRINT_LOG("osp_update_log logid:%d type:0x%x cur_sum_len:%u max_file_size_M:%u !\n", logid,type, p_log_file_cfg[logid][type].cur_sum_len, p_log_file_cfg[logid][type].max_file_size_M);
|
||||||
|
|
||||||
/*判断当前系统是否还有足够空间*/
|
/*判断当前系统是否还有足够空间*/
|
||||||
ulfreeram = osp_get_freeram();
|
//ulfreeram = osp_get_freeram();
|
||||||
if((ulfreeram <= FREE_RAM_SIZE) || (1 == g_ucFflushEnable))
|
if(1 == g_ucFflushEnable)
|
||||||
{
|
{
|
||||||
//sprintf(name, "rm -rf %s%u-%u-%s.log", p_log_file_cfg[logid][type].logname, (p_log_file_cfg[logid][type].cur_file_idx & 0x7)+1, logid, msg_name);
|
//sprintf(name, "rm -rf %s%u-%u-%s.log", p_log_file_cfg[logid][type].logname, (p_log_file_cfg[logid][type].cur_file_idx & 0x7)+1, logid, msg_name);
|
||||||
//system(name);
|
//system(name);
|
||||||
UCP_PRINT_LOG("osp_update_log line:%d logid:%d type:0x%x ulfreeram:%u g_ucFflushEnable:%u name:%s\n", __LINE__, logid, type, ulfreeram, g_ucFflushEnable, name);
|
UCP_PRINT_LOG("osp_update_log line:%d logid:%d type:0x%x g_ucFflushEnable:%u name:%s\n", __LINE__, logid, type, g_ucFflushEnable, name);
|
||||||
osp_log_cfg_reload();
|
osp_log_cfg_reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user