From 9483729328d4aa2986a94aa38668495fbe113b93 Mon Sep 17 00:00:00 2001 From: yuanyongjian Date: Wed, 13 Dec 2023 21:06:24 +0800 Subject: [PATCH] syslog/ramlog.c:Syslog add BIOC_FLUSH supports clearing log cache Signed-off-by: yuanyongjian --- drivers/syslog/ramlog.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/syslog/ramlog.c b/drivers/syslog/ramlog.c index 4bb602e380..5e84fc8fad 100644 --- a/drivers/syslog/ramlog.c +++ b/drivers/syslog/ramlog.c @@ -487,6 +487,9 @@ static int ramlog_file_ioctl(FAR struct file *filep, int cmd, case PIPEIOC_POLLINTHRD: upriv->rl_threashold = (uint32_t)arg; break; + case BIOC_FLUSH: + priv->rl_header->rl_head = 0; + break; default: ret = -ENOTTY; break;