mtd: Translate BIOC_PARTINFO into MTDIOC_PARTINFO on FTL driver

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
This commit is contained in:
Gustavo Henrique Nihei 2021-08-09 15:15:44 -03:00 committed by Xiang Xiao
parent b321ae023c
commit 62fa4b0018

View File

@ -540,6 +540,12 @@ static int ftl_ioctl(FAR struct inode *inode, int cmd, unsigned long arg)
cmd = MTDIOC_FLUSH;
}
else if (cmd == BIOC_PARTINFO)
{
/* Change the BIOC_PARTINFO command to the MTDIOC_PARTINFO command. */
cmd = MTDIOC_PARTINFO;
}
/* No other block driver ioctl commands are not recognized by this
* driver. Other possible MTD driver ioctl commands are passed through