- if (exfat_mount(&ef, spec, mount_options) != 0)
- {
- free(mount_options);
- return 1;
- }
-
- if (ef.ro == -1) /* read-only fallback was used */
- {
- 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)
- {
- exfat_unmount(&ef);
- return 1;
- }
-
- /* create arguments for fuse_mount() */
- if (fuse_opt_add_arg(&mount_args, "exfat") != 0 ||
- fuse_opt_add_arg(&mount_args, "-o") != 0 ||
- fuse_opt_add_arg(&mount_args, mount_options) != 0)
- {
- exfat_unmount(&ef);
- free(mount_options);
- return 1;
- }
-
- free(mount_options);
-
- /* create FUSE mount point */
- fc = fuse_mount(mount_point, &mount_args);
- fuse_opt_free_args(&mount_args);
- if (fc == NULL)