mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
fstools: fix ntfs3 mount with utf-8
This commit is contained in:
parent
d2460dfb82
commit
317d92dd3e
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=automount
|
PKG_NAME:=automount
|
||||||
PKG_VERSION:=1
|
PKG_VERSION:=1
|
||||||
PKG_RELEASE:=38
|
PKG_RELEASE:=39
|
||||||
PKG_ARCH:=all
|
PKG_ARCH:=all
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
@ -18,7 +18,7 @@ define Package/automount
|
|||||||
TITLE:=Mount autoconfig hotplug script.
|
TITLE:=Mount autoconfig hotplug script.
|
||||||
MAINTAINER:=Lean
|
MAINTAINER:=Lean
|
||||||
DEPENDS:=+block-mount +kmod-fs-exfat +kmod-fs-ext4 +kmod-fs-vfat +libblkid \
|
DEPENDS:=+block-mount +kmod-fs-exfat +kmod-fs-ext4 +kmod-fs-vfat +libblkid \
|
||||||
+kmod-usb-storage +kmod-usb-storage-extras +!TARGET_ramips:kmod-usb-storage-uas +ntfs3-mount
|
+kmod-usb-storage +kmod-usb-storage-extras +!TARGET_ramips:kmod-usb-storage-uas
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/automount/description
|
define Package/automount/description
|
||||||
|
23
package/system/fstools/patches/0200-ntfs3-with-utf8.patch
Normal file
23
package/system/fstools/patches/0200-ntfs3-with-utf8.patch
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
--- a/block.c
|
||||||
|
+++ b/block.c
|
||||||
|
@@ -943,6 +943,11 @@
|
||||||
|
{
|
||||||
|
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");
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
const char * const *filesystems;
|
||||||
|
int err = -EINVAL;
|
||||||
|
size_t count;
|
||||||
|
@@ -960,7 +965,7 @@
|
||||||
|
const char *fs = filesystems[i];
|
||||||
|
|
||||||
|
err = mount(source, target, fs, m ? m->flags : 0,
|
||||||
|
- (m && m->options) ? m->options : "");
|
||||||
|
+ (m && m->options) ? m->options : _data);
|
||||||
|
if (!err || errno != ENODEV)
|
||||||
|
break;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user