diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2021-04-11 09:10:55 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2021-04-12 18:19:06 +0000 |
commit | b6fce99046a3677f27373f8c701e6f200e290236 (patch) | |
tree | 9ea27b619af5962e415a52ceffaffc35aabd3c47 /firmware/target/hosted/ibasso/vold-ibasso.c | |
parent | e4345f2db8771fb773e07daf1a9f7bfac961c6bd (diff) | |
download | rockbox-b6fce99046a3677f27373f8c701e6f200e290236.tar.gz rockbox-b6fce99046a3677f27373f8c701e6f200e290236.zip |
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
Diffstat (limited to 'firmware/target/hosted/ibasso/vold-ibasso.c')
-rw-r--r-- | firmware/target/hosted/ibasso/vold-ibasso.c | 5 |
1 files changed, 4 insertions, 1 deletions
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 @@ | |||
45 | static const char VOLD_MONITOR_SOCKET_NAME[] = "UNIX_domain"; | 45 | static const char VOLD_MONITOR_SOCKET_NAME[] = "UNIX_domain"; |
46 | static int _vold_monitor_socket_fd = -1; | 46 | static int _vold_monitor_socket_fd = -1; |
47 | 47 | ||
48 | |||
49 | static void vold_monitor_open_socket(void) | 48 | static void vold_monitor_open_socket(void) |
50 | { | 49 | { |
51 | TRACE; | 50 | TRACE; |
@@ -82,6 +81,8 @@ static void vold_monitor_open_socket(void) | |||
82 | } | 81 | } |
83 | } | 82 | } |
84 | 83 | ||
84 | /* Track state of external SD */ | ||
85 | bool extsd_present = false; | ||
85 | 86 | ||
86 | /* | 87 | /* |
87 | bionic does not have pthread_cancel. | 88 | bionic does not have pthread_cancel. |
@@ -161,10 +162,12 @@ static void* vold_monitor_run(void* nothing) | |||
161 | else if(strcmp(msg, "Volume sdcard /mnt/external_sd state changed from 4 (Mounted) to 5 (Unmounting)") == 0) | 162 | else if(strcmp(msg, "Volume sdcard /mnt/external_sd state changed from 4 (Mounted) to 5 (Unmounting)") == 0) |
162 | { | 163 | { |
163 | /* We are loosing the external sdcard, inform Rockbox. */ | 164 | /* We are loosing the external sdcard, inform Rockbox. */ |
165 | extsd_present = false; | ||
164 | } | 166 | } |
165 | else if(strcmp(msg, "Volume sdcard /mnt/external_sd state changed from 3 (Checking) to 4 (Mounted)") == 0) | 167 | else if(strcmp(msg, "Volume sdcard /mnt/external_sd state changed from 3 (Checking) to 4 (Mounted)") == 0) |
166 | { | 168 | { |
167 | /* The external sdcard is back, inform Rockbox. */ | 169 | /* The external sdcard is back, inform Rockbox. */ |
170 | extsd_present = true; | ||
168 | } | 171 | } |
169 | } | 172 | } |
170 | } | 173 | } |