diff options
author | William Wilgus <me.theuser@yahoo.com> | 2024-05-02 13:38:32 -0400 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2024-05-02 13:38:32 -0400 |
commit | efcea6628024c5f6796c3850c3779801db4b6874 (patch) | |
tree | 6b0a5ce6ce0ddb46de5e412dae110d9ba99414d5 /firmware/target/hosted/filesystem-app.c | |
parent | 0c737d3b2e4728347cf4d52025f9fc2ebbee6e90 (diff) | |
download | rockbox-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 'firmware/target/hosted/filesystem-app.c')
-rw-r--r-- | firmware/target/hosted/filesystem-app.c | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/firmware/target/hosted/filesystem-app.c b/firmware/target/hosted/filesystem-app.c index fc4fff0eb5..7d59a174dc 100644 --- a/firmware/target/hosted/filesystem-app.c +++ b/firmware/target/hosted/filesystem-app.c | |||
@@ -453,56 +453,6 @@ struct dirent * app_readdir(DIR *dirp) | |||
453 | return (struct dirent *)osdirent; | 453 | return (struct dirent *)osdirent; |
454 | } | 454 | } |
455 | 455 | ||
456 | /* read a directory (reentrant) */ | ||
457 | int app_readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result) | ||
458 | { | ||
459 | struct __dir *this = (struct __dir *)dirp; | ||
460 | if (!this) | ||
461 | FILE_ERROR_RETURN(EBADF, -6); | ||
462 | |||
463 | if (!result) | ||
464 | FILE_ERROR_RETURN(EFAULT, -2); | ||
465 | |||
466 | *result = NULL; | ||
467 | |||
468 | if (!entry) | ||
469 | FILE_ERROR_RETURN(EFAULT, -3); | ||
470 | |||
471 | #ifdef HAVE_MULTIDRIVE | ||
472 | if (this->volumes_returned < NUM_VOLUMES) | ||
473 | { | ||
474 | while (++this->volumes_returned < NUM_VOLUMES) | ||
475 | { | ||
476 | if (!volume_present(this->volumes_returned)) | ||
477 | continue; | ||
478 | |||
479 | get_volume_name(this->volumes_returned, entry->d_name); | ||
480 | *result = entry; | ||
481 | return 0; | ||
482 | } | ||
483 | } | ||
484 | /* do normal directory reads */ | ||
485 | #endif /* HAVE_MULTIDRIVE */ | ||
486 | |||
487 | OS_DIRENT_T *osdirent = os_readdir(this->osdirp); | ||
488 | if (!osdirent) | ||
489 | FILE_ERROR_RETURN(ERRNO, -4); | ||
490 | #ifdef OS_DIRENT_CONVERT | ||
491 | size_t name_size = sizeof (entry->d_name); | ||
492 | if (strlcpy_from_os(entry->d_name, osdirent->d_name, | ||
493 | name_size) >= name_size) | ||
494 | { | ||
495 | entry->d_name[0] = '\0'; | ||
496 | errno = EOVERFLOW; | ||
497 | FILE_ERROR_RETURN(ENAMETOOLONG, -5); | ||
498 | } | ||
499 | |||
500 | *result = entry; | ||
501 | #endif /* OS_DIRENT_CONVERT */ | ||
502 | |||
503 | return 0; | ||
504 | } | ||
505 | |||
506 | int app_mkdir(const char *path) | 456 | int app_mkdir(const char *path) |
507 | { | 457 | { |
508 | char realpath[MAX_PATH]; | 458 | char realpath[MAX_PATH]; |