system/fastboot: Complete the erase command

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
This commit is contained in:
wangjianyu3 2023-12-05 20:36:19 +08:00 committed by Xiang Xiao
parent 25ba30986f
commit 1752726479

View File

@ -23,6 +23,7 @@
****************************************************************************/
#include <nuttx/config.h>
#include <nuttx/mtd/mtd.h>
#include <nuttx/version.h>
#include <errno.h>
@ -296,7 +297,15 @@ out:
static int fastboot_flash_erase(int fd)
{
return OK;
int ret;
ret = ioctl(fd, MTDIOC_BULKERASE, 0);
if (ret < 0)
{
printf("Erase device failed\n");
}
return ret;
}
static int