summaryrefslogtreecommitdiff
path: root/uisimulator/common/filesystem-sim.c
diff options
context:
space:
mode:
authorWilliam Wilgus <me.theuser@yahoo.com>2024-05-02 13:38:32 -0400
committerWilliam Wilgus <me.theuser@yahoo.com>2024-05-02 13:38:32 -0400
commitefcea6628024c5f6796c3850c3779801db4b6874 (patch)
tree6b0a5ce6ce0ddb46de5e412dae110d9ba99414d5 /uisimulator/common/filesystem-sim.c
parent0c737d3b2e4728347cf4d52025f9fc2ebbee6e90 (diff)
downloadrockbox-efcea6628024c5f6796c3850c3779801db4b6874.tar.gz
rockbox-efcea6628024c5f6796c3850c3779801db4b6874.zip
Revert "readdir_r use in tagcache.check_dir, ft_load"
This reverts commit 0c737d3b2e4728347cf4d52025f9fc2ebbee6e90. Reason for revert: Not really a concern as open_stream returns an independent buffer since g#566 Change-Id: Idbd2f4a7cc2ea6362b7714629469eeb7b3d19b3b
Diffstat (limited to 'uisimulator/common/filesystem-sim.c')
-rw-r--r--uisimulator/common/filesystem-sim.c35
1 files changed, 0 insertions, 35 deletions
diff --git a/uisimulator/common/filesystem-sim.c b/uisimulator/common/filesystem-sim.c
index 54e703ff40..f4f6321b7d 100644
--- a/uisimulator/common/filesystem-sim.c
+++ b/uisimulator/common/filesystem-sim.c
@@ -704,41 +704,6 @@ struct sim_dirent * sim_readdir(DIR *dirp)
704 return entry; 704 return entry;
705} 705}
706 706
707/* read a directory (reentrant) */
708int sim_readdir_r(DIR *dirp, struct sim_dirent *entry, struct sim_dirent **result)
709{
710 if (!result)
711 FILE_ERROR_RETURN(EFAULT, -2);
712
713 *result = NULL;
714
715 if (!entry)
716 FILE_ERROR_RETURN(EFAULT, -3);
717
718 struct dirstr_desc *dirstr = get_dirstr(dirp);
719 if (!dirstr)
720 FILE_ERROR_RETURN(ERRNO, -1);
721
722 entry->info.osdirent = NULL;
723
724 if (readdir_volume(dirstr, entry))
725 {
726 *result = entry;
727 return 0;
728 }
729 OS_DIRENT_T *osdirent = os_readdir(dirstr->osdirp);
730 if (!osdirent)
731 FILE_ERROR_RETURN(ERRNO, -4);
732
733 size_t size = sizeof (entry->d_name);
734 if (strlcpy_from_os(entry->d_name, osdirent->d_name, size) >= size)
735 FILE_ERROR_RETURN(ENAMETOOLONG, -5);
736
737 entry->info.osdirent = osdirent;
738 *result = entry;
739 return 0;
740}
741
742int sim_mkdir(const char *path) 707int sim_mkdir(const char *path)
743{ 708{
744 char ospath[SIM_TMPBUF_MAX_PATH]; 709 char ospath[SIM_TMPBUF_MAX_PATH];