summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/common/disk.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/firmware/common/disk.c b/firmware/common/disk.c
index 3a2d27e0d7..f32125e8a3 100644
--- a/firmware/common/disk.c
+++ b/firmware/common/disk.c
@@ -199,8 +199,6 @@ int disk_mount(int drive)
199 sizeof(fat_partition_types)) == NULL) 199 sizeof(fat_partition_types)) == NULL)
200 continue; /* not an accepted partition type */ 200 continue; /* not an accepted partition type */
201 201
202 bool success = false;
203
204 #ifdef MAX_LOG_SECTOR_SIZE 202 #ifdef MAX_LOG_SECTOR_SIZE
205 for (int j = 1; j <= (MAX_LOG_SECTOR_SIZE/SECTOR_SIZE); j <<= 1) 203 for (int j = 1; j <= (MAX_LOG_SECTOR_SIZE/SECTOR_SIZE); j <<= 1)
206 { 204 {
@@ -210,9 +208,9 @@ int disk_mount(int drive)
210 pinfo[i].size *= j; 208 pinfo[i].size *= j;
211 mounted++; 209 mounted++;
212 vol_drive[volume] = drive; /* remember the drive for this volume */ 210 vol_drive[volume] = drive; /* remember the drive for this volume */
213 volume = get_free_volume(); /* prepare next entry */
214 disk_sector_multiplier[drive] = j; 211 disk_sector_multiplier[drive] = j;
215 success = true; 212 volume_onmount_internal(IF_MV(volume));
213 volume = get_free_volume(); /* prepare next entry */
216 break; 214 break;
217 } 215 }
218 } 216 }
@@ -221,13 +219,10 @@ int disk_mount(int drive)
221 { 219 {
222 mounted++; 220 mounted++;
223 vol_drive[volume] = drive; /* remember the drive for this volume */ 221 vol_drive[volume] = drive; /* remember the drive for this volume */
222 volume_onmount_internal(IF_MV(volume));
224 volume = get_free_volume(); /* prepare next entry */ 223 volume = get_free_volume(); /* prepare next entry */
225 success = true;
226 } 224 }
227 #endif /* MAX_LOG_SECTOR_SIZE */ 225 #endif /* MAX_LOG_SECTOR_SIZE */
228
229 if (success)
230 volume_onmount_internal(IF_MV(volume));
231 } 226 }
232 227
233 if (mounted == 0 && volume != -1) /* none of the 4 entries worked? */ 228 if (mounted == 0 && volume != -1) /* none of the 4 entries worked? */