mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 10:39:08 +00:00
fs: fat: add rename
The implementation roughly follows the POSIX specification for rename() [1]. The ordering of operations attempting to minimize the chance for data loss in unexpected circumstances. The 'mv' command was implemented as a front end for the rename operation as that is what most users are likely familiar with in terms of behavior. The 'FAT_RENAME' Kconfig option was added to prevent code size increase on size-oriented builds like SPL. [1] https://pubs.opengroup.org/onlinepubs/9799919799/functions/rename.html Signed-off-by: Gabriel Dalimonte <gabriel.dalimonte@gmail.com>
This commit is contained in:
parent
d9c149664f
commit
06159a1465
11 changed files with 930 additions and 1 deletions
|
@ -206,6 +206,7 @@ int fat_opendir(const char *filename, struct fs_dir_stream **dirsp);
|
|||
int fat_readdir(struct fs_dir_stream *dirs, struct fs_dirent **dentp);
|
||||
void fat_closedir(struct fs_dir_stream *dirs);
|
||||
int fat_unlink(const char *filename);
|
||||
int fat_rename(const char *old_path, const char *new_path);
|
||||
int fat_mkdir(const char *dirname);
|
||||
void fat_close(void);
|
||||
void *fat_next_cluster(fat_itr *itr, unsigned int *nbytes);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue