summaryrefslogtreecommitdiffstats
path: root/gui/action.cpp
diff options
context:
space:
mode:
authorDees_Troy <dees_troy@teamw.in>2012-09-08 19:08:49 +0200
committerDees_Troy <dees_troy@teamw.in>2012-09-10 17:33:29 +0200
commit5112731666070037ac8ed78dfdad57a11bd4cb6d (patch)
treed25fe6ae32a6ab56025a3e73851d10dac953d1f2 /gui/action.cpp
parentAdd processing of fstab, mounting, and decrypt (diff)
downloadandroid_bootable_recovery-5112731666070037ac8ed78dfdad57a11bd4cb6d.tar
android_bootable_recovery-5112731666070037ac8ed78dfdad57a11bd4cb6d.tar.gz
android_bootable_recovery-5112731666070037ac8ed78dfdad57a11bd4cb6d.tar.bz2
android_bootable_recovery-5112731666070037ac8ed78dfdad57a11bd4cb6d.tar.lz
android_bootable_recovery-5112731666070037ac8ed78dfdad57a11bd4cb6d.tar.xz
android_bootable_recovery-5112731666070037ac8ed78dfdad57a11bd4cb6d.tar.zst
android_bootable_recovery-5112731666070037ac8ed78dfdad57a11bd4cb6d.zip
Diffstat (limited to 'gui/action.cpp')
-rw-r--r--gui/action.cpp22
1 files changed, 7 insertions, 15 deletions
diff --git a/gui/action.cpp b/gui/action.cpp
index db4c9c415..aee56849f 100644
--- a/gui/action.cpp
+++ b/gui/action.cpp
@@ -416,14 +416,11 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */)
{
string cmd;
if (arg == "EXTERNAL")
- cmd = "mount " + DataManager::GetStrValue(TW_EXTERNAL_MOUNT);
+ PartitionManager.Mount_By_Path(DataManager::GetStrValue(TW_EXTERNAL_MOUNT), true);
else if (arg == "INTERNAL")
- cmd = "mount " + DataManager::GetStrValue(TW_INTERNAL_MOUNT);
+ PartitionManager.Mount_By_Path(DataManager::GetStrValue(TW_INTERNAL_MOUNT), true);
else
- cmd = "mount " + arg;
- __system(cmd.c_str());
- if (arg == "/data" && DataManager::GetIntValue(TW_HAS_DATADATA) == 1)
- __system("mount /datadata");
+ PartitionManager.Mount_By_Path(arg, true);
} else
ui_print("Simulating actions...\n");
return 0;
@@ -443,16 +440,11 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */)
{
string cmd;
if (arg == "EXTERNAL")
- cmd = "umount " + DataManager::GetStrValue(TW_EXTERNAL_MOUNT);
+ PartitionManager.UnMount_By_Path(DataManager::GetStrValue(TW_EXTERNAL_MOUNT), true);
else if (arg == "INTERNAL")
- cmd = "umount " + DataManager::GetStrValue(TW_INTERNAL_MOUNT);
- else if (DataManager::GetIntValue(TW_DONT_UNMOUNT_SYSTEM) == 1 && (arg == "system" || arg == "/system"))
- return 0;
+ PartitionManager.UnMount_By_Path(DataManager::GetStrValue(TW_INTERNAL_MOUNT), true);
else
- cmd = "umount " + arg;
- __system(cmd.c_str());
- if (arg == "/data" && DataManager::GetIntValue(TW_HAS_DATADATA) == 1)
- __system("umount /datadata");
+ PartitionManager.UnMount_By_Path(arg, true);
} else
ui_print("Simulating actions...\n");
return 0;
@@ -549,7 +541,7 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */)
} else if (arg == "external") {
DataManager::SetValue(TW_USE_EXTERNAL_STORAGE, 1);
}
- if (PartitionManager.Mount_Settings_Storage(true)) {
+ if (PartitionManager.Mount_Current_Storage(true)) {
if (arg == "internal") {
// Save the current zip location to the external variable
DataManager::SetValue(TW_ZIP_EXTERNAL_VAR, DataManager::GetStrValue(TW_ZIP_LOCATION_VAR));