forked from coolsnowwolf/lede
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d2460df
commit 317d92d
Showing
2 changed files
with
25 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} |