From 1528b44349d33495c7ea5dc7b3fcd8e07995d16e Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Sun, 7 Jul 2024 14:36:55 -0400 Subject: More red fixes Change-Id: If22cdb286edac47b08b158bee6910ba7a539b041 --- firmware/export/config.h | 2 +- firmware/export/config/sim.h | 5 ----- firmware/export/mv.h | 3 +++ firmware/target/mips/ingenic_jz47xx/ata-nand-jz4760.c | 6 +++--- uisimulator/common/filesystem-sim.c | 2 +- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/firmware/export/config.h b/firmware/export/config.h index 3d94828ec3..5e5425a697 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h @@ -893,7 +893,7 @@ Lyre prototype 1 */ #endif /* Bootloaders don't need multivolume awareness */ -#if defined(BOOTLOADER) && defined(HAVE_MULTIVOLUME) +#if defined(BOOTLOADER) && defined(HAVE_MULTIVOLUME) && !(CONFIG_PLATFORM & PLATFORM_HOSTED) #undef HAVE_MULTIVOLUME #endif diff --git a/firmware/export/config/sim.h b/firmware/export/config/sim.h index 89a0f12b6a..0aeca695f0 100644 --- a/firmware/export/config/sim.h +++ b/firmware/export/config/sim.h @@ -25,11 +25,6 @@ #undef AMS_OF_SIZE -/* Simulator core requires hotswap */ -#ifndef HAVE_HOTSWAP -#define HAVE_HOTSWAP -#endif - #undef HAVE_HOTSWAP_STORAGE_AS_MAIN #undef HAVE_STORAGE_FLUSH diff --git a/firmware/export/mv.h b/firmware/export/mv.h index 966ff9a032..1122c7b85f 100644 --- a/firmware/export/mv.h +++ b/firmware/export/mv.h @@ -120,6 +120,9 @@ bool volume_ismounted(IF_MV_NONVOID(int volume)); #ifdef HAVE_HOTSWAP bool volume_removable(int volume); bool volume_present(int volume); +#else +#define volume_present(x) 1 +#define volueme_removeable(x) 0 #endif /* HAVE_HOTSWAP */ #ifdef HAVE_MULTIDRIVE diff --git a/firmware/target/mips/ingenic_jz47xx/ata-nand-jz4760.c b/firmware/target/mips/ingenic_jz47xx/ata-nand-jz4760.c index efce5742d0..1c9fe4300b 100644 --- a/firmware/target/mips/ingenic_jz47xx/ata-nand-jz4760.c +++ b/firmware/target/mips/ingenic_jz47xx/ata-nand-jz4760.c @@ -563,7 +563,7 @@ static inline int write_sector(unsigned long start, unsigned int count, return ret; } -int nand_read_sectors(IF_MV(int drive,) unsigned long start, int count, void* buf) +int nand_read_sectors(IF_MD(int drive,) unsigned long start, int count, void* buf) { #ifdef HAVE_MULTIVOLUME (void)drive; @@ -590,7 +590,7 @@ int nand_read_sectors(IF_MV(int drive,) unsigned long start, int count, void* bu return ret; } -int nand_write_sectors(IF_MV(int drive,) unsigned long start, int count, const void* buf) +int nand_write_sectors(IF_MD(int drive,) unsigned long start, int count, const void* buf) { #ifdef HAVE_MULTIVOLUME (void)drive; @@ -662,7 +662,7 @@ void nand_sleepnow(void) } #ifdef STORAGE_GET_INFO -void nand_get_info(IF_MV(int drive,) struct storage_info *info) +void nand_get_info(IF_MD(int drive,) struct storage_info *info) { #ifdef HAVE_MULTIVOLUME (void)drive; diff --git a/uisimulator/common/filesystem-sim.c b/uisimulator/common/filesystem-sim.c index f4f6321b7d..d3db25d02b 100644 --- a/uisimulator/common/filesystem-sim.c +++ b/uisimulator/common/filesystem-sim.c @@ -691,7 +691,7 @@ struct sim_dirent * sim_readdir(DIR *dirp) if (readdir_volume(dirstr, entry)) return entry; - + OS_DIRENT_T *osdirent = os_readdir(dirstr->osdirp); if (!osdirent) return NULL; -- cgit v1.2.3