mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
system/fastboot: Complete the erase command
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
This commit is contained in:
parent
25ba30986f
commit
1752726479
1 changed files with 10 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue