mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 10:37:38 -04:00
init_volume_names() has to be called AFTER storage_init()
...So just move that call into storage_init and be done with it! Hopefully this doesn't cause any functional regressions. Change-Id: I08700fbd1613638606a23ee3a0c2149123c2c24a
This commit is contained in:
parent
2363c7b095
commit
e722334ab1
2 changed files with 19 additions and 17 deletions
|
@ -761,7 +761,4 @@ void filesystem_init(void)
|
||||||
mrsw_init(&file_internal_mrsw);
|
mrsw_init(&file_internal_mrsw);
|
||||||
dc_init();
|
dc_init();
|
||||||
fileobj_mgr_init();
|
fileobj_mgr_init();
|
||||||
#ifdef HAVE_MULTIVOLUME
|
|
||||||
init_volume_names();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include "ata_idle_notify.h"
|
#include "ata_idle_notify.h"
|
||||||
#include "usb.h"
|
#include "usb.h"
|
||||||
#include "disk.h"
|
#include "disk.h"
|
||||||
|
#include "pathfuncs.h"
|
||||||
|
|
||||||
#ifdef CONFIG_STORAGE_MULTI
|
#ifdef CONFIG_STORAGE_MULTI
|
||||||
|
|
||||||
|
@ -275,21 +276,21 @@ int storage_init(void)
|
||||||
#ifdef CONFIG_STORAGE_MULTI
|
#ifdef CONFIG_STORAGE_MULTI
|
||||||
int i;
|
int i;
|
||||||
num_drives=0;
|
num_drives=0;
|
||||||
|
|
||||||
#if (CONFIG_STORAGE & STORAGE_ATA)
|
#if (CONFIG_STORAGE & STORAGE_ATA)
|
||||||
if ((rc=ata_init())) return rc;
|
if ((rc=ata_init())) return rc;
|
||||||
|
|
||||||
int ata_drives = ata_num_drives(num_drives);
|
int ata_drives = ata_num_drives(num_drives);
|
||||||
for (i=0; i<ata_drives; i++)
|
for (i=0; i<ata_drives; i++)
|
||||||
{
|
{
|
||||||
storage_drivers[num_drives++] =
|
storage_drivers[num_drives++] =
|
||||||
(STORAGE_ATA<<DRIVER_OFFSET) | (i << DRIVE_OFFSET);
|
(STORAGE_ATA<<DRIVER_OFFSET) | (i << DRIVE_OFFSET);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (CONFIG_STORAGE & STORAGE_MMC)
|
#if (CONFIG_STORAGE & STORAGE_MMC)
|
||||||
if ((rc=mmc_init())) return rc;
|
if ((rc=mmc_init())) return rc;
|
||||||
|
|
||||||
int mmc_drives = mmc_num_drives(num_drives);
|
int mmc_drives = mmc_num_drives(num_drives);
|
||||||
for (i=0; i<mmc_drives ;i++)
|
for (i=0; i<mmc_drives ;i++)
|
||||||
{
|
{
|
||||||
|
@ -300,7 +301,7 @@ int storage_init(void)
|
||||||
|
|
||||||
#if (CONFIG_STORAGE & STORAGE_SD)
|
#if (CONFIG_STORAGE & STORAGE_SD)
|
||||||
if ((rc=sd_init())) return rc;
|
if ((rc=sd_init())) return rc;
|
||||||
|
|
||||||
int sd_drives = sd_num_drives(num_drives);
|
int sd_drives = sd_num_drives(num_drives);
|
||||||
for (i=0; i<sd_drives; i++)
|
for (i=0; i<sd_drives; i++)
|
||||||
{
|
{
|
||||||
|
@ -311,7 +312,7 @@ int storage_init(void)
|
||||||
|
|
||||||
#if (CONFIG_STORAGE & STORAGE_NAND)
|
#if (CONFIG_STORAGE & STORAGE_NAND)
|
||||||
if ((rc=nand_init())) return rc;
|
if ((rc=nand_init())) return rc;
|
||||||
|
|
||||||
int nand_drives = nand_num_drives(num_drives);
|
int nand_drives = nand_num_drives(num_drives);
|
||||||
for (i=0; i<nand_drives; i++)
|
for (i=0; i<nand_drives; i++)
|
||||||
{
|
{
|
||||||
|
@ -322,7 +323,7 @@ int storage_init(void)
|
||||||
|
|
||||||
#if (CONFIG_STORAGE & STORAGE_RAMDISK)
|
#if (CONFIG_STORAGE & STORAGE_RAMDISK)
|
||||||
if ((rc=ramdisk_init())) return rc;
|
if ((rc=ramdisk_init())) return rc;
|
||||||
|
|
||||||
int ramdisk_drives = ramdisk_num_drives(num_drives);
|
int ramdisk_drives = ramdisk_num_drives(num_drives);
|
||||||
for (i=0; i<ramdisk_drives; i++)
|
for (i=0; i<ramdisk_drives; i++)
|
||||||
{
|
{
|
||||||
|
@ -334,6 +335,10 @@ int storage_init(void)
|
||||||
rc = STORAGE_FUNCTION(init)();
|
rc = STORAGE_FUNCTION(init)();
|
||||||
#endif /* CONFIG_STORAGE_MULTI */
|
#endif /* CONFIG_STORAGE_MULTI */
|
||||||
|
|
||||||
|
#ifdef HAVE_MULTIVOLUME
|
||||||
|
init_volume_names();
|
||||||
|
#endif
|
||||||
|
|
||||||
storage_thread_init();
|
storage_thread_init();
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
@ -520,7 +525,7 @@ bool storage_disk_is_active(void)
|
||||||
int storage_soft_reset(void)
|
int storage_soft_reset(void)
|
||||||
{
|
{
|
||||||
int rc=0;
|
int rc=0;
|
||||||
|
|
||||||
#if (CONFIG_STORAGE & STORAGE_ATA)
|
#if (CONFIG_STORAGE & STORAGE_ATA)
|
||||||
if ((rc=ata_soft_reset())) return rc;
|
if ((rc=ata_soft_reset())) return rc;
|
||||||
#endif
|
#endif
|
||||||
|
@ -548,7 +553,7 @@ int storage_soft_reset(void)
|
||||||
int storage_flush(void)
|
int storage_flush(void)
|
||||||
{
|
{
|
||||||
int rc=0;
|
int rc=0;
|
||||||
|
|
||||||
#if (CONFIG_STORAGE & STORAGE_ATA)
|
#if (CONFIG_STORAGE & STORAGE_ATA)
|
||||||
//if ((rc=ata_flush())) return rc;
|
//if ((rc=ata_flush())) return rc;
|
||||||
#endif
|
#endif
|
||||||
|
@ -648,7 +653,7 @@ long storage_last_disk_activity(void)
|
||||||
{
|
{
|
||||||
long max=0;
|
long max=0;
|
||||||
long t;
|
long t;
|
||||||
|
|
||||||
#if (CONFIG_STORAGE & STORAGE_ATA)
|
#if (CONFIG_STORAGE & STORAGE_ATA)
|
||||||
t=ata_last_disk_activity();
|
t=ata_last_disk_activity();
|
||||||
if (t>max) max=t;
|
if (t>max) max=t;
|
||||||
|
@ -681,7 +686,7 @@ int storage_spinup_time(void)
|
||||||
{
|
{
|
||||||
int max=0;
|
int max=0;
|
||||||
int t;
|
int t;
|
||||||
|
|
||||||
#if (CONFIG_STORAGE & STORAGE_ATA)
|
#if (CONFIG_STORAGE & STORAGE_ATA)
|
||||||
t=ata_spinup_time();
|
t=ata_spinup_time();
|
||||||
if (t>max) max=t;
|
if (t>max) max=t;
|
||||||
|
@ -716,7 +721,7 @@ void storage_get_info(int drive, struct storage_info *info)
|
||||||
{
|
{
|
||||||
int driver=(storage_drivers[drive] & DRIVER_MASK)>>DRIVER_OFFSET;
|
int driver=(storage_drivers[drive] & DRIVER_MASK)>>DRIVER_OFFSET;
|
||||||
int ldrive=(storage_drivers[drive] & DRIVE_MASK)>>DRIVE_OFFSET;
|
int ldrive=(storage_drivers[drive] & DRIVE_MASK)>>DRIVE_OFFSET;
|
||||||
|
|
||||||
switch(driver)
|
switch(driver)
|
||||||
{
|
{
|
||||||
#if (CONFIG_STORAGE & STORAGE_ATA)
|
#if (CONFIG_STORAGE & STORAGE_ATA)
|
||||||
|
@ -752,7 +757,7 @@ bool storage_removable(int drive)
|
||||||
{
|
{
|
||||||
int driver=(storage_drivers[drive] & DRIVER_MASK)>>DRIVER_OFFSET;
|
int driver=(storage_drivers[drive] & DRIVER_MASK)>>DRIVER_OFFSET;
|
||||||
int ldrive=(storage_drivers[drive] & DRIVE_MASK)>>DRIVE_OFFSET;
|
int ldrive=(storage_drivers[drive] & DRIVE_MASK)>>DRIVE_OFFSET;
|
||||||
|
|
||||||
switch(driver)
|
switch(driver)
|
||||||
{
|
{
|
||||||
#if (CONFIG_STORAGE & STORAGE_ATA)
|
#if (CONFIG_STORAGE & STORAGE_ATA)
|
||||||
|
@ -789,7 +794,7 @@ bool storage_present(int drive)
|
||||||
{
|
{
|
||||||
int driver=(storage_drivers[drive] & DRIVER_MASK)>>DRIVER_OFFSET;
|
int driver=(storage_drivers[drive] & DRIVER_MASK)>>DRIVER_OFFSET;
|
||||||
int ldrive=(storage_drivers[drive] & DRIVE_MASK)>>DRIVE_OFFSET;
|
int ldrive=(storage_drivers[drive] & DRIVE_MASK)>>DRIVE_OFFSET;
|
||||||
|
|
||||||
switch(driver)
|
switch(driver)
|
||||||
{
|
{
|
||||||
#if (CONFIG_STORAGE & STORAGE_ATA)
|
#if (CONFIG_STORAGE & STORAGE_ATA)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue