patches: Update for Bliss 11.2 Stable
Signed-off-by: Jackeagle <jackeagle102@gmail.com>
Change-Id: I6f7c6beee6581a349627f4f449f99f5c894e37e7
diff --git a/patches/system/vold/0002-Support-Samsung-s-implementation-of-exfat-called-sdf.patch b/patches/system/vold/0002-Support-Samsung-s-implementation-of-exfat-called-sdf.patch
new file mode 100644
index 0000000..d129fae
--- /dev/null
+++ b/patches/system/vold/0002-Support-Samsung-s-implementation-of-exfat-called-sdf.patch
@@ -0,0 +1,44 @@
+From 642887ce1ff0403fce542af0aea8c3c52ba07fdb Mon Sep 17 00:00:00 2001
+From: Pierre-Hugues Husson <phh@phh.me>
+Date: Mon, 20 Aug 2018 22:37:54 +0200
+Subject: [PATCH 2/4] Support Samsung's implementation of exfat, called sdfat
+
+---
+ fs/Exfat.cpp | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/fs/Exfat.cpp b/fs/Exfat.cpp
+index 5c15075..5e23a79 100644
+--- a/fs/Exfat.cpp
++++ b/fs/Exfat.cpp
+@@ -35,7 +35,7 @@ static const char* kFsckPath = "/system/bin/fsck.exfat";
+
+ bool IsSupported() {
+ return access(kMkfsPath, X_OK) == 0 && access(kFsckPath, X_OK) == 0 &&
+- IsFilesystemSupported("exfat");
++ (IsFilesystemSupported("exfat") || IsFilesystemSupported("sdfat"));
+ }
+
+ status_t Check(const std::string& source) {
+@@ -60,13 +60,16 @@ status_t Mount(const std::string& source, const std::string& target, int ownerUi
+ auto mountData = android::base::StringPrintf("uid=%d,gid=%d,fmask=%o,dmask=%o", ownerUid,
+ ownerGid, permMask, permMask);
+
+- if (mount(source.c_str(), target.c_str(), "exfat", mountFlags, mountData.c_str()) == 0) {
++ const char *fs = "exfat";
++ if(IsFilesystemSupported("sdfat"))
++ fs = "sdfat";
++ if (mount(source.c_str(), target.c_str(), fs, mountFlags, mountData.c_str()) == 0) {
+ return 0;
+ }
+
+ PLOG(ERROR) << "Mount failed; attempting read-only";
+ mountFlags |= MS_RDONLY;
+- if (mount(source.c_str(), target.c_str(), "exfat", mountFlags, mountData.c_str()) == 0) {
++ if (mount(source.c_str(), target.c_str(), fs, mountFlags, mountData.c_str()) == 0) {
+ return 0;
+ }
+
+--
+2.17.1
+