From c0a49d9bdf66f03b8de917395893886fd9222b35 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Mon, 12 Apr 2021 16:34:55 -0400 Subject: ibasso: Default to assuming the external SD card is inserted Detection at startup is proving to be unreliable. Even if card is not present at startup, upon insertion it will sort itself out properly. Change-Id: I9ee90b724c90c530a39264f698c200a48aa72b1d --- firmware/target/hosted/ibasso/vold-ibasso.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/firmware/target/hosted/ibasso/vold-ibasso.c b/firmware/target/hosted/ibasso/vold-ibasso.c index f56bd683d3..c0cb06b6b8 100644 --- a/firmware/target/hosted/ibasso/vold-ibasso.c +++ b/firmware/target/hosted/ibasso/vold-ibasso.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -82,7 +83,7 @@ static void vold_monitor_open_socket(void) } /* Track state of external SD */ -bool extsd_present = false; +bool extsd_present = true; /* Worst-case is it will show up empty */ /* bionic does not have pthread_cancel. @@ -107,6 +108,10 @@ static void* vold_monitor_run(void* nothing) DEBUGF("DEBUG %s: Thread start.", __func__); + /* Check to see if external SD is mounted */ +// extsd_present = !system("mountpoint -q /mnt/external_sd"); +// extsd_present = !system("mount -o remount,rw /mnt/external_sd"); + vold_monitor_open_socket(); if(_vold_monitor_socket_fd < 0) { -- cgit v1.2.3