From efcea6628024c5f6796c3850c3779801db4b6874 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Thu, 2 May 2024 13:38:32 -0400 Subject: 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 --- uisimulator/common/filesystem-sim.c | 35 ----------------------------------- 1 file changed, 35 deletions(-) (limited to 'uisimulator/common/filesystem-sim.c') 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) return entry; } -/* read a directory (reentrant) */ -int sim_readdir_r(DIR *dirp, struct sim_dirent *entry, struct sim_dirent **result) -{ - if (!result) - FILE_ERROR_RETURN(EFAULT, -2); - - *result = NULL; - - if (!entry) - FILE_ERROR_RETURN(EFAULT, -3); - - struct dirstr_desc *dirstr = get_dirstr(dirp); - if (!dirstr) - FILE_ERROR_RETURN(ERRNO, -1); - - entry->info.osdirent = NULL; - - if (readdir_volume(dirstr, entry)) - { - *result = entry; - return 0; - } - OS_DIRENT_T *osdirent = os_readdir(dirstr->osdirp); - if (!osdirent) - FILE_ERROR_RETURN(ERRNO, -4); - - size_t size = sizeof (entry->d_name); - if (strlcpy_from_os(entry->d_name, osdirent->d_name, size) >= size) - FILE_ERROR_RETURN(ENAMETOOLONG, -5); - - entry->info.osdirent = osdirent; - *result = entry; - return 0; -} - int sim_mkdir(const char *path) { char ospath[SIM_TMPBUF_MAX_PATH]; -- cgit v1.2.3