summaryrefslogtreecommitdiffstats
path: root/partition.cpp
diff options
context:
space:
mode:
authorbig biff <bigbiff@teamw.in>2018-12-24 16:08:07 +0100
committerGerrit Code Review <gerrit2@gerrit.omnirom.org>2018-12-24 16:08:07 +0100
commit09ee3ea4227fd7046b5b0d54dc83371e218786d1 (patch)
tree5f2fc1a1e59572d5c66d335eb59bb63aa8f277bf /partition.cpp
parentMerge "Add option to use ro.serialno for generating device id" into android-9.0 (diff)
parenttwrp: use ANDROID_ROOT environment variable (diff)
downloadandroid_bootable_recovery-09ee3ea4227fd7046b5b0d54dc83371e218786d1.tar
android_bootable_recovery-09ee3ea4227fd7046b5b0d54dc83371e218786d1.tar.gz
android_bootable_recovery-09ee3ea4227fd7046b5b0d54dc83371e218786d1.tar.bz2
android_bootable_recovery-09ee3ea4227fd7046b5b0d54dc83371e218786d1.tar.lz
android_bootable_recovery-09ee3ea4227fd7046b5b0d54dc83371e218786d1.tar.xz
android_bootable_recovery-09ee3ea4227fd7046b5b0d54dc83371e218786d1.tar.zst
android_bootable_recovery-09ee3ea4227fd7046b5b0d54dc83371e218786d1.zip
Diffstat (limited to 'partition.cpp')
-rw-r--r--partition.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/partition.cpp b/partition.cpp
index e7b3d2d8a..1bdb91a35 100644
--- a/partition.cpp
+++ b/partition.cpp
@@ -430,7 +430,7 @@ bool TWPartition::Process_Fstab_Line(const char *fstab_line, bool Display_Error,
} else if (Is_File_System(Fstab_File_System)) {
Find_Actual_Block_Device();
Setup_File_System(Display_Error);
- if (Mount_Point == "/system") {
+ if (Mount_Point == PartitionManager.Get_Android_Root_Path()) {
Display_Name = "System";
Backup_Display_Name = Display_Name;
Storage_Name = Display_Name;
@@ -1504,7 +1504,7 @@ bool TWPartition::UnMount(bool Display_Error) {
int never_unmount_system;
DataManager::GetValue(TW_DONT_UNMOUNT_SYSTEM, never_unmount_system);
- if (never_unmount_system == 1 && Mount_Point == "/system")
+ if (never_unmount_system == 1 && Mount_Point == PartitionManager.Get_Android_Root_Path())
return true; // Never unmount system if you're not supposed to unmount it
if (Is_Storage && MTP_Storage_ID > 0)
@@ -2624,7 +2624,7 @@ bool TWPartition::Restore_Tar(PartitionSettings *part_settings) {
ret = true;
#ifdef HAVE_CAPABILITIES
// Restore capabilities to the run-as binary
- if (Mount_Point == "/system" && Mount(true) && TWFunc::Path_Exists("/system/bin/run-as")) {
+ if (Mount_Point == PartitionManager.Get_Android_Root_Path() && Mount(true) && TWFunc::Path_Exists("/system/bin/run-as")) {
struct vfs_cap_data cap_data;
uint64_t capabilities = (1 << CAP_SETUID) | (1 << CAP_SETGID);