summaryrefslogtreecommitdiff
path: root/bootloader/x1000/install.c
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2022-03-05 09:38:13 +0000
committerAidan MacDonald <amachronic@protonmail.com>2022-03-12 18:25:10 +0000
commit7554a49309fe31e69747c64caa28b4303270481b (patch)
tree0712f67d4e7d3b7ae4b33709f4a1f7e426c5210b /bootloader/x1000/install.c
parent905591215fdad421f9985ad846b082b86a9ed0b7 (diff)
downloadrockbox-7554a49309fe31e69747c64caa28b4303270481b.tar.gz
rockbox-7554a49309fe31e69747c64caa28b4303270481b.zip
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
Diffstat (limited to 'bootloader/x1000/install.c')
-rw-r--r--bootloader/x1000/install.c4
1 files changed, 1 insertions, 3 deletions
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 @@
25#include "installer-x1000.h" 25#include "installer-x1000.h"
26#include <stdio.h> 26#include <stdio.h>
27 27
28extern int init_disk(void);
29
30enum { 28enum {
31 INSTALL, 29 INSTALL,
32 BACKUP, 30 BACKUP,
@@ -35,7 +33,7 @@ enum {
35 33
36static void bootloader_action(int which) 34static void bootloader_action(int which)
37{ 35{
38 if(init_disk() != 0) { 36 if(check_disk(true) != DISK_PRESENT) {
39 splash2(5*HZ, "Install aborted", "Cannot access SD card"); 37 splash2(5*HZ, "Install aborted", "Cannot access SD card");
40 return; 38 return;
41 } 39 }