mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-10 05:32:40 -05:00
disk: Clean up identing (no funcitonal change)
Change-Id: I7a689132b155579ab3938231330f5bde7566809b
This commit is contained in:
parent
bf2a929f4e
commit
d401501fda
1 changed files with 14 additions and 15 deletions
|
|
@ -331,19 +331,18 @@ int disk_mount(int drive)
|
||||||
disk_sector_multiplier[IF_MD_DRV(drive)] = 1;
|
disk_sector_multiplier[IF_MD_DRV(drive)] = 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* try "superfloppy" mode */
|
/* try "superfloppy" mode */
|
||||||
DEBUGF("Trying to mount sector 0.\n");
|
DEBUGF("Trying to mount sector 0.\n");
|
||||||
|
|
||||||
if (!fat_mount(IF_MV(volume,) IF_MD(drive,) 0))
|
if (!fat_mount(IF_MV(volume,) IF_MD(drive,) 0))
|
||||||
{
|
{
|
||||||
#ifdef MAX_LOG_SECTOR_SIZE
|
#ifdef MAX_LOG_SECTOR_SIZE
|
||||||
disk_sector_multiplier[drive] =
|
disk_sector_multiplier[drive] = fat_get_bytes_per_sector(IF_MV(volume)) / SECTOR_SIZE;
|
||||||
fat_get_bytes_per_sector(IF_MV(volume)) / SECTOR_SIZE;
|
#endif
|
||||||
#endif
|
mounted = 1;
|
||||||
mounted = 1;
|
init_volume(&volumes[volume], drive, 0);
|
||||||
init_volume(&volumes[volume], drive, 0);
|
volume_onmount_internal(IF_MV(volume));
|
||||||
volume_onmount_internal(IF_MV(volume));
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (mounted == 0 && volume != -1) /* not a "superfloppy"? */
|
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);
|
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)
|
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))
|
if (!fat_mount(IF_MV(volume,) IF_MD(drive,) pinfo[i].start * j))
|
||||||
|
|
@ -371,7 +370,7 @@ int disk_mount(int drive)
|
||||||
break;
|
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))
|
if (!fat_mount(IF_MV(volume,) IF_MD(drive,) pinfo[i].start))
|
||||||
{
|
{
|
||||||
mounted++;
|
mounted++;
|
||||||
|
|
@ -379,7 +378,7 @@ int disk_mount(int drive)
|
||||||
volume_onmount_internal(IF_MV(volume));
|
volume_onmount_internal(IF_MV(volume));
|
||||||
volume = get_free_volume(); /* prepare next entry */
|
volume = get_free_volume(); /* prepare next entry */
|
||||||
}
|
}
|
||||||
#endif /* MAX_LOG_SECTOR_SIZE */
|
#endif /* MAX_LOG_SECTOR_SIZE */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue