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:
parent
1dcada4917
commit
5a51d3b23f
1 changed files with 7 additions and 0 deletions
|
@ -459,6 +459,13 @@ static int bch_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||||
if (bchinode->u.i_bops->ioctl != NULL)
|
if (bchinode->u.i_bops->ioctl != NULL)
|
||||||
{
|
{
|
||||||
ret = bchinode->u.i_bops->ioctl(bchinode, cmd, arg);
|
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;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue