From e722334ab13ca7e9af198413a0a08df2e13fbd8c Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Sun, 28 Jul 2024 21:15:41 -0400 Subject: 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 --- firmware/common/file_internal.c | 3 --- firmware/storage.c | 33 +++++++++++++++++++-------------- 2 files changed, 19 insertions(+), 17 deletions(-) (limited to 'firmware') diff --git a/firmware/common/file_internal.c b/firmware/common/file_internal.c index 28d370e15f..e4554670af 100644 --- a/firmware/common/file_internal.c +++ b/firmware/common/file_internal.c @@ -761,7 +761,4 @@ void filesystem_init(void) mrsw_init(&file_internal_mrsw); dc_init(); fileobj_mgr_init(); -#ifdef HAVE_MULTIVOLUME - init_volume_names(); -#endif } diff --git a/firmware/storage.c b/firmware/storage.c index 267b0b8dfb..ac4e35b66b 100644 --- a/firmware/storage.c +++ b/firmware/storage.c @@ -23,6 +23,7 @@ #include "ata_idle_notify.h" #include "usb.h" #include "disk.h" +#include "pathfuncs.h" #ifdef CONFIG_STORAGE_MULTI @@ -275,21 +276,21 @@ int storage_init(void) #ifdef CONFIG_STORAGE_MULTI int i; num_drives=0; - + #if (CONFIG_STORAGE & STORAGE_ATA) if ((rc=ata_init())) return rc; - + int ata_drives = ata_num_drives(num_drives); for (i=0; imax) max=t; @@ -681,7 +686,7 @@ int storage_spinup_time(void) { int max=0; int t; - + #if (CONFIG_STORAGE & STORAGE_ATA) t=ata_spinup_time(); 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 ldrive=(storage_drivers[drive] & DRIVE_MASK)>>DRIVE_OFFSET; - + switch(driver) { #if (CONFIG_STORAGE & STORAGE_ATA) @@ -752,7 +757,7 @@ bool storage_removable(int drive) { int driver=(storage_drivers[drive] & DRIVER_MASK)>>DRIVER_OFFSET; int ldrive=(storage_drivers[drive] & DRIVE_MASK)>>DRIVE_OFFSET; - + switch(driver) { #if (CONFIG_STORAGE & STORAGE_ATA) @@ -789,7 +794,7 @@ bool storage_present(int drive) { int driver=(storage_drivers[drive] & DRIVER_MASK)>>DRIVER_OFFSET; int ldrive=(storage_drivers[drive] & DRIVE_MASK)>>DRIVE_OFFSET; - + switch(driver) { #if (CONFIG_STORAGE & STORAGE_ATA) -- cgit v1.2.3