diff options
Diffstat (limited to 'uisimulator/common/filesystem-sim.c')
-rw-r--r-- | uisimulator/common/filesystem-sim.c | 35 |
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) */ | ||
708 | int 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 | |||
742 | int sim_mkdir(const char *path) | 707 | int sim_mkdir(const char *path) |
743 | { | 708 | { |
744 | char ospath[SIM_TMPBUF_MAX_PATH]; | 709 | char ospath[SIM_TMPBUF_MAX_PATH]; |