Opt_discard,
Opt_fs,
Opt_adj_req,
+#ifdef CONFIG_SDFAT_USE_FOR_VFAT
+ Opt_shortname_lower,
+ Opt_shortname_win95,
+ Opt_shortname_winnt,
+ Opt_shortname_mixed,
+#endif /* CONFIG_SDFAT_USE_FOR_VFAT */
};
static const match_table_t sdfat_tokens = {
{Opt_discard, "discard"},
{Opt_fs, "fs=%s"},
{Opt_adj_req, "adj_req"},
+#ifdef CONFIG_SDFAT_USE_FOR_VFAT
+ {Opt_shortname_lower, "shortname=lower"},
+ {Opt_shortname_win95, "shortname=win95"},
+ {Opt_shortname_winnt, "shortname=winnt"},
+ {Opt_shortname_mixed, "shortname=mixed"},
+#endif /* CONFIG_SDFAT_USE_FOR_VFAT */
{Opt_err, NULL}
};
IMSG("adjust request config is not enabled. ignore\n");
#endif
break;
+#ifdef CONFIG_SDFAT_USE_FOR_VFAT
+ case Opt_shortname_lower:
+ case Opt_shortname_win95:
+ case Opt_shortname_mixed:
+ pr_warn("[SDFAT] DRAGONS AHEAD! sdFAT only understands \"shortname=winnt\"!\n");
+ case Opt_shortname_winnt:
+ break;
+#endif /* CONFIG_SDFAT_USE_FOR_VFAT */
default:
if (!silent) {
sdfat_msg(sb, KERN_ERR,
};
#endif /* CONFIG_SDFAT_USE_FOR_EXFAT */
+#ifdef CONFIG_SDFAT_USE_FOR_VFAT
+static struct file_system_type vfat_fs_type = {
+ .owner = THIS_MODULE,
+ .name = "vfat",
+ .mount = sdfat_fs_mount,
+#ifdef CONFIG_SDFAT_DBG_IOCTL
+ .kill_sb = sdfat_debug_kill_sb,
+#else
+ .kill_sb = kill_block_super,
+#endif /* CONFIG_SDFAT_DBG_IOCTL */
+ .fs_flags = FS_REQUIRES_DEV,
+};
+#endif /* CONFIG_SDFAT_USE_FOR_VFAT */
+
static int __init init_sdfat_fs(void)
{
int err;
}
#endif /* CONFIG_SDFAT_USE_FOR_EXFAT */
+#ifdef CONFIG_SDFAT_USE_FOR_VFAT
+ err = register_filesystem(&vfat_fs_type);
+ if (err) {
+ pr_err("[SDFAT] failed to register for vfat filesystem\n");
+ goto error;
+ }
+#endif /* CONFIG_SDFAT_USE_FOR_VFAT */
+
return 0;
error:
sdfat_statistics_uninit();
#ifdef CONFIG_SDFAT_USE_FOR_EXFAT
unregister_filesystem(&exfat_fs_type);
#endif /* CONFIG_SDFAT_USE_FOR_EXFAT */
+#ifdef CONFIG_SDFAT_USE_FOR_VFAT
+ unregister_filesystem(&vfat_fs_type);
+#endif /* CONFIG_SDFAT_USE_FOR_VFAT */
fsapi_shutdown();
}