From d401501fdad9a3c0299e1b8bdfadcb8a41c2eba5 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Thu, 31 Oct 2024 21:51:22 -0400 Subject: disk: Clean up identing (no funcitonal change) Change-Id: I7a689132b155579ab3938231330f5bde7566809b --- firmware/common/disk.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) (limited to 'firmware/common/disk.c') 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 */ } } -- cgit v1.2.3