mirror of
https://github.com/apache/nuttx.git
synced 2026-05-21 21:34:07 +08:00
drivers/bch: Drivers may not support command BIOC_FLUSH
Calling `bchlib_flushsector()` maybe enough on some devices. Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
This commit is contained in:
@@ -459,6 +459,13 @@ static int bch_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
if (bchinode->u.i_bops->ioctl != NULL)
|
||||
{
|
||||
ret = bchinode->u.i_bops->ioctl(bchinode, cmd, arg);
|
||||
|
||||
/* Drivers may not support command BIOC_FLUSH */
|
||||
|
||||
if (ret == -ENOTTY && cmd == BIOC_FLUSH)
|
||||
{
|
||||
ret = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user