OSDN Git Service

Added clean up on FUSE module shutdown.
authorresver <resver@60bc1c72-a15a-11de-b98f-4500b42dc123>
Sun, 11 Oct 2009 16:23:41 +0000 (16:23 +0000)
committerresver <resver@60bc1c72-a15a-11de-b98f-4500b42dc123>
Sun, 11 Oct 2009 16:23:41 +0000 (16:23 +0000)
git-svn-id: http://exfat.googlecode.com/svn/trunk@28 60bc1c72-a15a-11de-b98f-4500b42dc123

fuse/main.c

index 7009029..ecc4698 100644 (file)
@@ -138,6 +138,11 @@ static int fuse_exfat_statfs(const char *path, struct statvfs *sfs)
        return 0;
 }
 
+void fuse_exfat_destroy(void* unused)
+{
+       exfat_unmount(&ef);
+}
+
 static void usage(const char* prog)
 {
        fprintf(stderr, "Usage: %s <spec> <mountpoint> [-o options]\n", prog);
@@ -152,6 +157,7 @@ static struct fuse_operations fuse_exfat_ops =
        .release        = fuse_exfat_release,
        .read           = fuse_exfat_read,
        .statfs         = fuse_exfat_statfs,
+       .destroy        = fuse_exfat_destroy,
 };
 
 int main(int argc, char* argv[])