summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--partitionmanager.cpp16
-rw-r--r--twrp.cpp2
2 files changed, 9 insertions, 9 deletions
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index 69812c86e..5c325773a 100644
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -128,14 +128,14 @@ int TWPartitionManager::Write_Fstab(void) {
if ((*iter)->Can_Be_Mounted) {
Line = (*iter)->Actual_Block_Device + " " + (*iter)->Mount_Point + " " + (*iter)->Current_File_System + " rw\n";
fputs(Line.c_str(), fp);
- // Handle subpartition tracking
- if ((*iter)->Is_SubPartition) {
- TWPartition* ParentPartition = Find_Partition_By_Path((*iter)->SubPartition_Of);
- if (ParentPartition)
- ParentPartition->Has_SubPartition = true;
- else
- LOGERR("Unable to locate parent partition '%s' of '%s'\n", (*iter)->SubPartition_Of.c_str(), (*iter)->Mount_Point.c_str());
- }
+ }
+ // Handle subpartition tracking
+ if ((*iter)->Is_SubPartition) {
+ TWPartition* ParentPartition = Find_Partition_By_Path((*iter)->SubPartition_Of);
+ if (ParentPartition)
+ ParentPartition->Has_SubPartition = true;
+ else
+ LOGERR("Unable to locate parent partition '%s' of '%s'\n", (*iter)->SubPartition_Of.c_str(), (*iter)->Mount_Point.c_str());
}
}
fclose(fp);
diff --git a/twrp.cpp b/twrp.cpp
index 938a07adf..9825ebf52 100644
--- a/twrp.cpp
+++ b/twrp.cpp
@@ -127,7 +127,7 @@ int main(int argc, char **argv) {
char twrp_booted[PROPERTY_VALUE_MAX];
property_get("ro.twrp.boot", twrp_booted, "0");
- if (strcmp(twrp_booted, "0") != 0) {
+ if (strcmp(twrp_booted, "0") == 0) {
property_list(Print_Prop, NULL);
printf("\n");
property_set("ro.twrp.boot", "1");