mtd/nand: Implement MTDIOC_ERASESTATE ioctl

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2023-05-01 02:22:02 +08:00 committed by Alin Jerpelea
parent 3c54e66683
commit 3fc882df9e

View File

@ -790,6 +790,14 @@ static int nand_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg)
}
break;
case MTDIOC_ERASESTATE:
{
FAR uint8_t *result = (FAR uint8_t *)arg;
*result = 0xff;
ret = OK;
}
break;
default:
ret = -ENOTTY; /* Bad command */
break;