From 2c50e18ca3a21d7531746fd4792c031422085661 Mon Sep 17 00:00:00 2001 From: Dees_Troy Date: Wed, 26 Sep 2012 20:05:28 -0400 Subject: Handle mountable boot partitions --- partition.cpp | 12 ++++++++++-- partitionmanager.cpp | 10 +++++++++- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/partition.cpp b/partition.cpp index 4c0baedcd..4d1c9c5ad 100644 --- a/partition.cpp +++ b/partition.cpp @@ -225,6 +225,9 @@ bool TWPartition::Process_Fstab_Line(string Line, bool Display_Error) { Display_Name = "SD-Ext"; Wipe_Available_in_GUI = true; Removable = true; + } else if (Mount_Point == "/boot") { + Display_Name = "Boot"; + DataManager::SetValue("tw_boot_is_mountable", 1); } #ifdef TW_EXTERNAL_STORAGE_PATH if (Mount_Point == EXPAND(TW_EXTERNAL_STORAGE_PATH)) { @@ -1099,8 +1102,13 @@ bool TWPartition::Backup_Tar(string backup_folder) { if (!Mount(true)) return false; - TWFunc::GUI_Operation_Text(TW_BACKUP_TEXT, Display_Name, "Backing Up"); - ui_print("Backing up %s...\n", Display_Name.c_str()); + if (Backup_Path == "/and-sec") { + TWFunc::GUI_Operation_Text(TW_BACKUP_TEXT, "Android Secure", "Backing Up"); + ui_print("Backing up %s...\n", "Android Secure"); + } else { + TWFunc::GUI_Operation_Text(TW_BACKUP_TEXT, Display_Name, "Backing Up"); + ui_print("Backing up %s...\n", Display_Name.c_str()); + } DataManager::GetValue(TW_USE_COMPRESSION_VAR, use_compression); if (use_compression) diff --git a/partitionmanager.cpp b/partitionmanager.cpp index 98151b43c..b267b8b6f 100644 --- a/partitionmanager.cpp +++ b/partitionmanager.cpp @@ -1380,6 +1380,14 @@ void TWPartitionManager::Update_System_Details(void) { DataManager::SetValue(TW_BACKUP_ANDSEC_VAR, 0); } else DataManager::SetValue(TW_HAS_ANDROID_SECURE, 1); + } else if ((*iter)->Mount_Point == "/boot") { + int backup_display_size = (int)((*iter)->Backup_Size / 1048576LLU); + DataManager::SetValue(TW_BACKUP_BOOT_SIZE, backup_display_size); + if ((*iter)->Backup_Size == 0) { + DataManager::SetValue("tw_has_boot_partition", 0); + DataManager::SetValue(TW_BACKUP_BOOT_VAR, 0); + } else + DataManager::SetValue("tw_has_boot_partition", 1); } #ifdef SP1_NAME if ((*iter)->Backup_Name == EXPAND(SP1_NAME)) { @@ -1623,4 +1631,4 @@ void TWPartitionManager::Mount_All_Storage(void) { if ((*iter)->Is_Storage) (*iter)->Mount(false); } -} \ No newline at end of file +} -- cgit v1.2.3