Skip to content

Commit

Permalink
Add compatability for LG and HTC ROM vold mounting + utf8 hack.
Browse files Browse the repository at this point in the history
And some cleanups. mods thanks to @faux123 :)
  • Loading branch information
dorimanx committed Apr 26, 2014
1 parent 222e556 commit d4a9606
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 12 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ EXTRA_FLAGS += -I$(PWD)

#
# KDIR is a path to a directory containing kernel source.
# It can be specified on the command line passed to make to enable the module to
# It can be specified on the command line passed to make to enable the module to
# be built and installed for a kernel other than the one currently running.
# By default it is the path to the symbolic link created when
# By default it is the path to the symbolic link created when
# the current kernel's modules were installed, but
# any valid path to the directory in which the target kernel's source is located
# can be provided on the command line.
Expand Down Expand Up @@ -53,4 +53,4 @@ uninstall:

endif

.PHONY : all clean install uninstall
.PHONY : all clean install uninstall
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ Let's take [linux] as the path to your kernel source dir...
edit [linux]/fs/Kconfig
```
menu "DOS/FAT/NT Filesystems"
source "fs/fat/Kconfig"
+source "fs/exfat/Kconfig"
source "fs/ntfs/Kconfig"
```

endmenu

edit [linux]/fs/Makefile
Expand Down
24 changes: 18 additions & 6 deletions exfat_super.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,11 +372,11 @@ static int exfat_d_hashi(const struct dentry *dentry, const struct inode *inode,

#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
static int exfat_cmpi(const struct dentry *parent, const struct dentry *dentry,
unsigned int len, const char *str, const struct qstr *name)
unsigned int len, const char *str, const struct qstr *name)
#else
static int exfat_cmpi(const struct dentry *parent, const struct inode *pinode,
const struct dentry *dentry, const struct inode *inode,
unsigned int len, const char *str, const struct qstr *name)
const struct dentry *dentry, const struct inode *inode,
unsigned int len, const char *str, const struct qstr *name)
#endif
{
struct nls_table *t = EXFAT_SB(parent->d_sb)->nls_io;
Expand All @@ -393,11 +393,11 @@ static int exfat_cmpi(const struct dentry *parent, const struct inode *pinode,

#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
static int exfat_cmp(const struct dentry *parent, const struct dentry *dentry,
unsigned int len, const char *str, const struct qstr *name)
unsigned int len, const char *str, const struct qstr *name)
#else
static int exfat_cmp(const struct dentry *parent, const struct inode *pinode,
const struct dentry *dentry, const struct inode *inode,
unsigned int len, const char *str, const struct qstr *name)
const struct dentry *dentry, const struct inode *inode,
unsigned int len, const char *str, const struct qstr *name)
#endif
{
unsigned int alen, blen;
Expand Down Expand Up @@ -2063,6 +2063,7 @@ enum {
Opt_err_cont,
Opt_err_panic,
Opt_err_ro,
Opt_utf8_hack,
Opt_err,
#ifdef CONFIG_EXFAT_DISCARD
Opt_discard,
Expand All @@ -2083,6 +2084,7 @@ static const match_table_t exfat_tokens = {
{Opt_err_cont, "errors=continue"},
{Opt_err_panic, "errors=panic"},
{Opt_err_ro, "errors=remount-ro"},
{Opt_utf8_hack, "utf8"},
#ifdef CONFIG_EXFAT_DISCARD
{Opt_discard, "discard"},
#endif /* CONFIG_EXFAT_DISCARD */
Expand Down Expand Up @@ -2188,6 +2190,8 @@ static int parse_options(char *options, int silent, int *debug,
opts->discard = 1;
break;
#endif /* CONFIG_EXFAT_DISCARD */
case Opt_utf8_hack:
break;
default:
if (!silent)
printk(KERN_ERR "[EXFAT] Unrecognized mount option %s or missing value\n", p);
Expand Down Expand Up @@ -2433,7 +2437,11 @@ static void exfat_debug_kill_sb(struct super_block *sb)

static struct file_system_type exfat_fs_type = {
.owner = THIS_MODULE,
#if defined(CONFIG_MACH_LGE) || defined(CONFIG_HTC_BATT_CORE)
.name = "texfat",
#else
.name = "exfat",
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)
.get_sb = exfat_get_sb,
#else
Expand Down Expand Up @@ -2488,5 +2496,9 @@ module_exit(exit_exfat);
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("exFAT Filesystem Driver");
#ifdef MODULE_ALIAS_FS
#if defined(CONFIG_MACH_LGE) || defined(CONFIG_HTC_BATT_CORE)
MODULE_ALIAS_FS("texfat");
#else
MODULE_ALIAS_FS("exfat");
#endif
#endif
2 changes: 1 addition & 1 deletion exfat_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
/* */
/************************************************************************/

#define EXFAT_VERSION "1.2.8"
#define EXFAT_VERSION "1.2.9"

0 comments on commit d4a9606

Please sign in to comment.