From b6fce99046a3677f27373f8c701e6f200e290236 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Sun, 11 Apr 2021 09:10:55 -0400 Subject: ibasso: Implement proper PIVOT_ROOT filesystem access Including direct use of the external SD card mount Known issue: If SD card is inserted at startup, it must be ejected and reinserted to be registered. Change-Id: I5f420160bda32135cbb088c1e8b04b6e3a73018e --- firmware/target/hosted/ibasso/vold-ibasso.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'firmware/target/hosted/ibasso/vold-ibasso.c') diff --git a/firmware/target/hosted/ibasso/vold-ibasso.c b/firmware/target/hosted/ibasso/vold-ibasso.c index c92b86d364..f56bd683d3 100644 --- a/firmware/target/hosted/ibasso/vold-ibasso.c +++ b/firmware/target/hosted/ibasso/vold-ibasso.c @@ -45,7 +45,6 @@ static const char VOLD_MONITOR_SOCKET_NAME[] = "UNIX_domain"; static int _vold_monitor_socket_fd = -1; - static void vold_monitor_open_socket(void) { TRACE; @@ -82,6 +81,8 @@ static void vold_monitor_open_socket(void) } } +/* Track state of external SD */ +bool extsd_present = false; /* bionic does not have pthread_cancel. @@ -161,10 +162,12 @@ static void* vold_monitor_run(void* nothing) else if(strcmp(msg, "Volume sdcard /mnt/external_sd state changed from 4 (Mounted) to 5 (Unmounting)") == 0) { /* We are loosing the external sdcard, inform Rockbox. */ + extsd_present = false; } else if(strcmp(msg, "Volume sdcard /mnt/external_sd state changed from 3 (Checking) to 4 (Mounted)") == 0) { /* The external sdcard is back, inform Rockbox. */ + extsd_present = true; } } } -- cgit v1.2.3