summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2024-10-31 21:51:22 -0400
committerSolomon Peachy <pizza@shaftnet.org>2024-10-31 21:51:42 -0400
commitd401501fdad9a3c0299e1b8bdfadcb8a41c2eba5 (patch)
tree09cae818fda5638636247d5834ae08cd83c0f0a1
parentbf2a929f4ea34cf81c23478560203480a01a56c6 (diff)
downloadrockbox-d401501fda.tar.gz
rockbox-d401501fda.zip
disk: Clean up identing (no funcitonal change)
Change-Id: I7a689132b155579ab3938231330f5bde7566809b
-rw-r--r--firmware/common/disk.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/firmware/common/disk.c b/firmware/common/disk.c
index 576eede143..bef04037ad 100644
--- a/firmware/common/disk.c
+++ b/firmware/common/disk.c
@@ -331,19 +331,18 @@ int disk_mount(int drive)
disk_sector_multiplier[IF_MD_DRV(drive)] = 1;
#endif
- /* try "superfloppy" mode */
- DEBUGF("Trying to mount sector 0.\n");
+ /* try "superfloppy" mode */
+ DEBUGF("Trying to mount sector 0.\n");
- if (!fat_mount(IF_MV(volume,) IF_MD(drive,) 0))
- {
- #ifdef MAX_LOG_SECTOR_SIZE
- disk_sector_multiplier[drive] =
- fat_get_bytes_per_sector(IF_MV(volume)) / SECTOR_SIZE;
- #endif
- mounted = 1;
- init_volume(&volumes[volume], drive, 0);
- volume_onmount_internal(IF_MV(volume));
- }
+ if (!fat_mount(IF_MV(volume,) IF_MD(drive,) 0))
+ {
+#ifdef MAX_LOG_SECTOR_SIZE
+ disk_sector_multiplier[drive] = fat_get_bytes_per_sector(IF_MV(volume)) / SECTOR_SIZE;
+#endif
+ mounted = 1;
+ init_volume(&volumes[volume], drive, 0);
+ volume_onmount_internal(IF_MV(volume));
+ }
if (mounted == 0 && volume != -1) /* not a "superfloppy"? */
{
@@ -356,7 +355,7 @@ int disk_mount(int drive)
DEBUGF("Trying to mount partition %d.\n", i);
- #ifdef MAX_LOG_SECTOR_SIZE
+#ifdef MAX_LOG_SECTOR_SIZE
for (int j = 1; j <= (MAX_LOG_SECTOR_SIZE/SECTOR_SIZE); j <<= 1)
{
if (!fat_mount(IF_MV(volume,) IF_MD(drive,) pinfo[i].start * j))
@@ -371,7 +370,7 @@ int disk_mount(int drive)
break;
}
}
- #else /* ndef MAX_LOG_SECTOR_SIZE */
+#else /* ndef MAX_LOG_SECTOR_SIZE */
if (!fat_mount(IF_MV(volume,) IF_MD(drive,) pinfo[i].start))
{
mounted++;
@@ -379,7 +378,7 @@ int disk_mount(int drive)
volume_onmount_internal(IF_MV(volume));
volume = get_free_volume(); /* prepare next entry */
}
- #endif /* MAX_LOG_SECTOR_SIZE */
+#endif /* MAX_LOG_SECTOR_SIZE */
}
}