]> git.sven.stormbind.net Git - sven/fuse-exfat.git/blobdiff - fuse/main.c
Imported Upstream version 0.9.6
[sven/fuse-exfat.git] / fuse / main.c
index fe5666beabab1fe0657ef670aa7ed357a8829fc3..a8134276c8bf4eaa1cba07b7b779dec965ec5b42 100644 (file)
@@ -37,7 +37,7 @@
        #error FUSE 2.6 or later is required
 #endif
 
-const char* default_options = "allow_other,blkdev";
+const char* default_options = "ro_fallback,allow_other,blkdev";
 
 struct exfat ef;
 
@@ -426,6 +426,16 @@ int main(int argc, char* argv[])
                return 1;
        }
 
+       if (ef.ro_fallback)
+       {
+               mount_options = add_option(mount_options, "ro", NULL);
+               if (mount_options == NULL)
+               {
+                       exfat_unmount(&ef);
+                       return 1;
+               }
+       }
+
        mount_options = add_fuse_options(mount_options, spec);
        if (mount_options == NULL)
        {