mtd/nand: Implement MTDIOC_ERASESECTORS ioctl
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
3fc882df9e
commit
b4814811f5
@ -798,6 +798,13 @@ static int nand_ioctl(FAR struct mtd_dev_s *dev, int cmd, unsigned long arg)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case MTDIOC_ERASESECTORS:
|
||||||
|
{
|
||||||
|
FAR struct mtd_erase_s *erase = (FAR struct mtd_erase_s *)arg;
|
||||||
|
ret = nand_erase(dev, erase->startblock, erase->nblocks);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
ret = -ENOTTY; /* Bad command */
|
ret = -ENOTTY; /* Bad command */
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user