blob: 7e1eba02dee5d671ceebe159942268463dca7bd3 [file] [log] [blame]
developer23f9f0f2023-06-15 13:06:25 +08001diff -urN a/package/system/fstools/patches/0100-automount.patch b/package/system/fstools/patches/0100-automount.patch
2--- a/package/system/fstools/patches/0100-automount.patch 1970-01-01 08:00:00.000000000 +0800
3+++ b/package/system/fstools/patches/0100-automount.patch 2020-07-30 18:16:13.122072146 +0800
4@@ -0,0 +1,22 @@
5+Index: fstools-2016-12-04-84b530a7/block.c
6+===================================================================
7+--- fstools-2016-12-04-84b530a7.orig/block.c 2017-08-17 16:10:43.236274000 +0800
8++++ fstools-2016-12-04-84b530a7/block.c 2017-08-17 16:11:02.423958000 +0800
9+@@ -530,7 +530,7 @@
10+ printf("\toption\tuuid\t'%s'\n", pr->uuid);
11+ else
12+ printf("\toption\tdevice\t'%s'\n", pr->dev);
13+- printf("\toption\tenabled\t'0'\n\n");
14++ printf("\toption\tenabled\t'1'\n\n");
15+
16+ return 0;
17+ }
18+@@ -1454,7 +1454,7 @@
19+ cache_load(0);
20+ printf("config 'global'\n");
21+ printf("\toption\tanon_swap\t'0'\n");
22+- printf("\toption\tanon_mount\t'0'\n");
23++ printf("\toption\tanon_mount\t'1'\n");
24+ printf("\toption\tauto_swap\t'1'\n");
25+ printf("\toption\tauto_mount\t'1'\n");
26+ printf("\toption\tdelay_root\t'5'\n");
27diff -urN a/package/system/fstools/patches/0102-mount-options.patch b/package/system/fstools/patches/0102-mount-options.patch
28--- a/package/system/fstools/patches/0102-mount-options.patch 1970-01-01 08:00:00.000000000 +0800
29+++ b/package/system/fstools/patches/0102-mount-options.patch 2020-07-30 18:16:13.190070353 +0800
30@@ -0,0 +1,19 @@
31+Index: fstools-2016-12-04-84b530a7/block.c
32+===================================================================
33+--- fstools-2016-12-04-84b530a7.orig/block.c 2017-10-31 18:34:40.867026783 +0800
34++++ fstools-2016-12-04-84b530a7/block.c 2017-10-31 18:39:16.417175783 +0800
35+@@ -854,9 +854,13 @@
36+ int i, err;
37+ size_t mount_opts_len;
38+ char *mount_opts = NULL, *ptr;
39++ char _data[128] = {0};
40++ if (strstr(fstype, "fat") || strstr(fstype, "ntfs")) {
41++ snprintf(_data, sizeof(_data), "%s", "iocharset=utf8,uid=65534,gid=65534");
42++ }
43+
44+ err = mount(source, target, fstype, m ? m->flags : 0,
45+- (m && m->options) ? m->options : "");
46++ (m && m->options) ? m->options : _data);
47+
48+ /* Requested file system type is not available in kernel,
49+ attempt to call mount helper. */
50diff -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
51--- a/package/system/fstools/patches/0103-mtk-ntfs-mount-by-ufsd.patch 1970-01-01 08:00:00.000000000 +0800
52+++ b/package/system/fstools/patches/0103-mtk-ntfs-mount-by-ufsd.patch 2021-01-26 14:21:31.235330174 +0800
53@@ -0,0 +1,12 @@
54+--- a/block.c 2017-11-07 11:13:11.502259230 +0800
55++++ b/block.c 2017-11-07 11:16:43.484684786 +0800
56+@@ -859,6 +859,9 @@
57+ snprintf(_data, sizeof(_data), "%s", "iocharset=utf8,uid=65534,gid=65534");
58+ }
59+
60++ if (strstr(fstype, "ntfs"))
61++ fstype= "ufsd";
62++
63+ err = mount(source, target, fstype, m ? m->flags : 0,
64+ (m && m->options) ? m->options : _data);
65+