blob: 7e1eba02dee5d671ceebe159942268463dca7bd3 [file] [log] [blame]
diff -urN a/package/system/fstools/patches/0100-automount.patch b/package/system/fstools/patches/0100-automount.patch
--- a/package/system/fstools/patches/0100-automount.patch 1970-01-01 08:00:00.000000000 +0800
+++ b/package/system/fstools/patches/0100-automount.patch 2020-07-30 18:16:13.122072146 +0800
@@ -0,0 +1,22 @@
+Index: fstools-2016-12-04-84b530a7/block.c
+===================================================================
+--- fstools-2016-12-04-84b530a7.orig/block.c 2017-08-17 16:10:43.236274000 +0800
++++ fstools-2016-12-04-84b530a7/block.c 2017-08-17 16:11:02.423958000 +0800
+@@ -530,7 +530,7 @@
+ printf("\toption\tuuid\t'%s'\n", pr->uuid);
+ else
+ printf("\toption\tdevice\t'%s'\n", pr->dev);
+- printf("\toption\tenabled\t'0'\n\n");
++ printf("\toption\tenabled\t'1'\n\n");
+
+ return 0;
+ }
+@@ -1454,7 +1454,7 @@
+ cache_load(0);
+ printf("config 'global'\n");
+ printf("\toption\tanon_swap\t'0'\n");
+- printf("\toption\tanon_mount\t'0'\n");
++ printf("\toption\tanon_mount\t'1'\n");
+ printf("\toption\tauto_swap\t'1'\n");
+ printf("\toption\tauto_mount\t'1'\n");
+ printf("\toption\tdelay_root\t'5'\n");
diff -urN a/package/system/fstools/patches/0102-mount-options.patch b/package/system/fstools/patches/0102-mount-options.patch
--- a/package/system/fstools/patches/0102-mount-options.patch 1970-01-01 08:00:00.000000000 +0800
+++ b/package/system/fstools/patches/0102-mount-options.patch 2020-07-30 18:16:13.190070353 +0800
@@ -0,0 +1,19 @@
+Index: fstools-2016-12-04-84b530a7/block.c
+===================================================================
+--- fstools-2016-12-04-84b530a7.orig/block.c 2017-10-31 18:34:40.867026783 +0800
++++ fstools-2016-12-04-84b530a7/block.c 2017-10-31 18:39:16.417175783 +0800
+@@ -854,9 +854,13 @@
+ int i, err;
+ size_t mount_opts_len;
+ char *mount_opts = NULL, *ptr;
++ char _data[128] = {0};
++ if (strstr(fstype, "fat") || strstr(fstype, "ntfs")) {
++ snprintf(_data, sizeof(_data), "%s", "iocharset=utf8,uid=65534,gid=65534");
++ }
+
+ err = mount(source, target, fstype, m ? m->flags : 0,
+- (m && m->options) ? m->options : "");
++ (m && m->options) ? m->options : _data);
+
+ /* Requested file system type is not available in kernel,
+ attempt to call mount helper. */
diff -urN a/package/system/fstools/patches/0103-mtk-ntfs-mount-by-ufsd.patch b/package/system/fstools/patches/0103-mtk-ntfs-mount-by-ufsd.patch
--- a/package/system/fstools/patches/0103-mtk-ntfs-mount-by-ufsd.patch 1970-01-01 08:00:00.000000000 +0800
+++ b/package/system/fstools/patches/0103-mtk-ntfs-mount-by-ufsd.patch 2021-01-26 14:21:31.235330174 +0800
@@ -0,0 +1,12 @@
+--- a/block.c 2017-11-07 11:13:11.502259230 +0800
++++ b/block.c 2017-11-07 11:16:43.484684786 +0800
+@@ -859,6 +859,9 @@
+ snprintf(_data, sizeof(_data), "%s", "iocharset=utf8,uid=65534,gid=65534");
+ }
+
++ if (strstr(fstype, "ntfs"))
++ fstype= "ufsd";
++
+ err = mount(source, target, fstype, m ? m->flags : 0,
+ (m && m->options) ? m->options : _data);
+