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
This commit is contained in:
codelover
2015-03-14 20:26:49 +08:00
committed by Dees Troy
parent 7d66ce57b6
commit 2a3d4ce3ca

View File

@@ -1029,7 +1029,7 @@ bool TWPartition::Mount(bool Display_Error) {
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;