From 7554a49309fe31e69747c64caa28b4303270481b Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Sat, 5 Mar 2022 09:38:13 +0000 Subject: x1000: bootloader: refactor init_disk Add check_disk() to query the disk insertion status and prompt the user if necessary. Use this in place of init_disk(). Perform an unconditional disk_mount_all() from the main function. Change-Id: I9a8cc42266edf99cd15ece3aee8fa25835df04ae --- bootloader/x1000/install.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'bootloader/x1000/install.c') diff --git a/bootloader/x1000/install.c b/bootloader/x1000/install.c index aa4fdde3b0..e4af66443b 100644 --- a/bootloader/x1000/install.c +++ b/bootloader/x1000/install.c @@ -25,8 +25,6 @@ #include "installer-x1000.h" #include -extern int init_disk(void); - enum { INSTALL, BACKUP, @@ -35,7 +33,7 @@ enum { static void bootloader_action(int which) { - if(init_disk() != 0) { + if(check_disk(true) != DISK_PRESENT) { splash2(5*HZ, "Install aborted", "Cannot access SD card"); return; } -- cgit v1.2.3