syslog/ramlog.c:Syslog add BIOC_FLUSH supports clearing log cache

Signed-off-by: yuanyongjian <yuanyongjian@xiaomi.com>
This commit is contained in:
yuanyongjian 2023-12-13 21:06:24 +08:00 committed by Xiang Xiao
parent a0813b808f
commit 9483729328
1 changed files with 3 additions and 0 deletions

View File

@ -487,6 +487,9 @@ static int ramlog_file_ioctl(FAR struct file *filep, int cmd,
case PIPEIOC_POLLINTHRD: case PIPEIOC_POLLINTHRD:
upriv->rl_threashold = (uint32_t)arg; upriv->rl_threashold = (uint32_t)arg;
break; break;
case BIOC_FLUSH:
priv->rl_header->rl_head = 0;
break;
default: default:
ret = -ENOTTY; ret = -ENOTTY;
break; break;