summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorMarek Vasut <[email protected]>2025-04-13 10:55:04 +0200
committerTom Rini <[email protected]>2025-04-21 11:07:04 -0600
commite5cbc3d2874ff5ec80f4a5c92b5db61769670d5f (patch)
tree2aecec29ff8c292281bcd11318411dc33c1db46f /fs
parent1761c298afd53423377fad95ebce203e46c084de (diff)
fs: exfat: Implement trivial 'rename' support
Implement exfat_fs_rename() to rename or move files. This is used by the 'mv' generic FS interface command. The rename implementation for other filesystems was added recently and was not part of exfat porting layer due to merge issue, which made 'mv' command crash, fix this by adding the missing implementation. Fixes: b86a651b646c ("fs: exfat: Add U-Boot porting layer") Signed-off-by: Marek Vasut <[email protected]>
Diffstat (limited to 'fs')
-rw-r--r--fs/exfat/io.c5
-rw-r--r--fs/fs.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/fs/exfat/io.c b/fs/exfat/io.c
index 43c05713ed0..c56f5675987 100644
--- a/fs/exfat/io.c
+++ b/fs/exfat/io.c
@@ -1013,6 +1013,11 @@ exit:
return err;
}
+int exfat_fs_rename(const char *old_path, const char *new_path)
+{
+ return exfat_rename(&ctxt.ef, old_path, new_path);
+}
+
void exfat_fs_close(void)
{
exfat_unmount(&ctxt.ef);
diff --git a/fs/fs.c b/fs/fs.c
index 0b62217fd59..1f36872fb9a 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -401,6 +401,7 @@ static struct fstype_info fstypes[] = {
.ln = fs_ln_unsupported,
.unlink = exfat_fs_unlink,
.mkdir = exfat_fs_mkdir,
+ .rename = exfat_fs_rename,
},
#endif
{