From 175272647931512686ff2a6cfce1d927e4d08ea1 Mon Sep 17 00:00:00 2001 From: wangjianyu3 Date: Tue, 5 Dec 2023 20:36:19 +0800 Subject: [PATCH] system/fastboot: Complete the erase command Signed-off-by: wangjianyu3 --- system/fastboot/fastboot.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/system/fastboot/fastboot.c b/system/fastboot/fastboot.c index f1d1a19de..1d4786889 100644 --- a/system/fastboot/fastboot.c +++ b/system/fastboot/fastboot.c @@ -23,6 +23,7 @@ ****************************************************************************/ #include +#include #include #include @@ -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