diff options
Diffstat (limited to 'fs/Ntfs.cpp')
-rw-r--r-- | fs/Ntfs.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/Ntfs.cpp b/fs/Ntfs.cpp index 81d5d15..76330b4 100644 --- a/fs/Ntfs.cpp +++ b/fs/Ntfs.cpp @@ -33,7 +33,11 @@ namespace ntfs { static const char* kMkfsPath = "/system/bin/mkfs.ntfs"; static const char* kFsckPath = "/system/bin/fsck.ntfs"; +#ifdef CONFIG_KERNEL_HAVE_NTFS +static const char* kMountPath = "/system/bin/mount"; +#else static const char* kMountPath = "/system/bin/mount.ntfs"; +#endif bool IsSupported() { return access(kMkfsPath, X_OK) == 0 @@ -61,8 +65,12 @@ status_t Mount(const std::string& source, const std::string& target, bool ro, const char* c_target = target.c_str(); sprintf(mountData, +#ifdef CONFIG_KERNEL_HAVE_NTFS + "utf8,uid=%d,gid=%d,fmask=%o,dmask=%o,nodev,nosuid", +#else "utf8,uid=%d,gid=%d,fmask=%o,dmask=%o," "shortname=mixed,nodev,nosuid,dirsync", +#endif ownerUid, ownerGid, permMask, permMask); if (!executable) @@ -74,6 +82,10 @@ status_t Mount(const std::string& source, const std::string& target, bool ro, std::vector<std::string> cmd; cmd.push_back(kMountPath); +#ifdef CONFIG_KERNEL_HAVE_NTFS + cmd.push_back("-t"); + cmd.push_back("ntfs"); +#endif cmd.push_back("-o"); cmd.push_back(mountData); cmd.push_back(c_source); |