Fix TWRP not mounting /data/media type storage if built with toolbox utils
* ONLY Applicable when building with 'TW_USE_TOOLBOX := true'
* toolbox's 'mount' expects the first argument to be a block device, but /data/media is a dir.
* Technically we don't 'mount' a dir to another, we 'bind' it instead.
* So we define the mount option explicitly with '-o bind'. (supported by busybox 'mount' too)
Change-Id: If97c9096167fb723150b949f4336005b3313a174
diff --git a/partition.cpp b/partition.cpp
index 87a605b..ef29bb6 100644
--- a/partition.cpp
+++ b/partition.cpp
@@ -1029,7 +1029,7 @@
Update_Size(Display_Error);
if (!Symlink_Mount_Point.empty()) {
- string Command = "mount '" + Symlink_Path + "' '" + Symlink_Mount_Point + "'";
+ string Command = "mount -o bind '" + Symlink_Path + "' '" + Symlink_Mount_Point + "'";
TWFunc::Exec_Cmd(Command);
}
return true;