Signed-off-by: John Crispin <blogic@openwrt.org>
return ret;
}
+static int detect_exfat(int fd)
+{
+ int ret = NONE;
+ unsigned char *buffer = (unsigned char*)malloc(FAT_BUF_SIZE);
+ if(get_buffer(fd, buffer, 0, FAT_BUF_SIZE) != 0)
+ goto out;
+
+ if (!memcmp(buffer + 3, "EXFAT ", 7))
+ ret = EXFAT;
+out:
+ free(buffer);
+ return ret;
+}
+
#define HFSPLUS_VOL_JOURNALED (1 << 13)
#define HFSPLUS_BUF_SIZE 512
static int detect_hfsplus(int fd)
dfunc funcs[] = {
detect_ext23,
+ detect_exfat,
detect_fat,
detect_ntfs,
detect_hfsplus,
#define EFI 7
#define NTFS 8
#define EXTENDED 9
-#define EXT4 10
+#define EXFAT 10
+#define EXT4 11
int detect_fs(char *device);
pid = autofs_safe_fork();
if(!pid)
{
+ if(mount->fs == EXFAT)
+ {
+ log_printf("mount -t exfat -o rw,uid=1000,gid=1000 /dev/%s %s", mount->dev, tmp);
+ ret = system_printf("mount -t exfat -o rw,uid=1000,gid=1000 /dev/%s %s", mount->dev, tmp);
+ }
if(mount->fs == FAT)
{
log_printf("mount -t vfat -o rw,uid=1000,gid=1000 /dev/%s %s", mount->dev, tmp);