OSDN Git Service

Implement rename in FUSE driver.
authorrelan <relan@users.noreply.github.com>
Sun, 10 Jan 2010 08:19:18 +0000 (08:19 +0000)
committerrelan <relan@users.noreply.github.com>
Mon, 24 Aug 2015 05:26:11 +0000 (08:26 +0300)
fuse/main.c

index 8f723e1..b3e7ae8 100644 (file)
@@ -189,6 +189,12 @@ static int fuse_exfat_mkdir(const char* path, mode_t mode)
        return exfat_mkdir(&ef, path);
 }
 
+static int fuse_exfat_rename(const char* old_path, const char* new_path)
+{
+       exfat_debug("[fuse_exfat_rename] %s => %s", old_path, new_path);
+       return exfat_rename(&ef, old_path, new_path);
+}
+
 static int fuse_exfat_utimens(const char* path, const struct timespec tv[2])
 {
        struct exfat_node* node;
@@ -253,6 +259,7 @@ static struct fuse_operations fuse_exfat_ops =
        .rmdir          = fuse_exfat_rmdir,
        .mknod          = fuse_exfat_mknod,
        .mkdir          = fuse_exfat_mkdir,
+       .rename         = fuse_exfat_rename,
        .utimens        = fuse_exfat_utimens,
        .statfs         = fuse_exfat_statfs,
        .destroy        = fuse_exfat_destroy,