--- 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; }