esp32,esp8266: Allow Ctrl-C to interrupt the corrupt-fs while loop.

Commit c046b23ea2 prevented frozen boot code
from being interrupted by Ctrl-C, but that means a corrupt filesystem will
forever lock up an esp32/esp8266 board.  This commit fixes that by
explicitly enabling Ctrl-C before running the forever loop.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George 2023-06-15 12:19:57 +10:00
parent 0908d00453
commit 47dc7d0130
2 changed files with 8 additions and 0 deletions

View File

@ -17,6 +17,10 @@ def check_bootsec():
def fs_corrupted(): def fs_corrupted():
import time import time
import micropython
# Allow this loop to be stopped via Ctrl-C.
micropython.kbd_intr(3)
while 1: while 1:
print( print(

View File

@ -26,6 +26,10 @@ def check_bootsec():
def fs_corrupted(): def fs_corrupted():
import time import time
import micropython
# Allow this loop to be stopped via Ctrl-C.
micropython.kbd_intr(3)
while 1: while 1:
print( print(