diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2024-07-19 22:00:52 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2024-07-19 22:04:00 -0400 |
commit | 46280095033d4f561a6c1d3fcca871ac706073e8 (patch) | |
tree | 3934e247b1697edf5c8cd1c35a0f416ee91a0763 | |
parent | 87ef6bb9e1c32e6a79a04bdc787ace568848520e (diff) | |
download | rockbox-4628009503.tar.gz rockbox-4628009503.zip |
simulator: A few MULTIVOLUME cleanups in the code.
Change-Id: Ia170c06df7624a801ce043e49e078afffa79eee2
-rw-r--r-- | uisimulator/common/filesystem-sim.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/uisimulator/common/filesystem-sim.c b/uisimulator/common/filesystem-sim.c index df914ebcd7..7a3418021e 100644 --- a/uisimulator/common/filesystem-sim.c +++ b/uisimulator/common/filesystem-sim.c @@ -34,6 +34,7 @@ #include "pathfuncs.h" #include "string-extra.h" #include "debug.h" +#include "mv.h" #ifndef os_fstatat #define USE_OSDIRNAME /* we need to remember the open directory path */ @@ -204,20 +205,20 @@ void sim_ext_extracted(int drive) for (unsigned int i = 0; i < MAX_OPEN_FILES; i++) { struct filestr_desc *filestr = &openfiles[i]; - if (filestr->osfd >= 0 && volume_drive(filestr->volume) == drive) + if (filestr->osfd >= 0 && IF_MV(volume_drive(filestr->volume) == drive)) filestr->mounted = false; } for (unsigned int i = 0; i < MAX_OPEN_DIRS; i++) { struct dirstr_desc *dirstr = &opendirs[i]; - if (dirstr->osdirp && volume_drive(dirstr->volume) == drive) + if (dirstr->osdirp && IF_MV(volume_drive(dirstr->volume) == drive)) dirstr->mounted = false; } (void)drive; } -#endif /* HAVE_MULTIDRIVE */ +#endif /* HAVE_HOTSWAP */ /** * Provides target-like path parsing behavior with single and multiple volumes @@ -314,14 +315,12 @@ int sim_get_os_path(char *buffer, const char *path, size_t bufsize) if (next > p) { - #ifdef HAVE_MULTIDRIVE /* Feign failure if the volume isn't "mounted" */ if (!volume_present(volume)) { errno = ENXIO; return -1; } - #endif /* HAVE_MULTIDRIVE */ sysroot = false; |