diff options
Diffstat (limited to '')
-rw-r--r-- | twrp.cpp | 20 |
1 files changed, 6 insertions, 14 deletions
@@ -53,10 +53,8 @@ extern "C" { } #endif -#ifdef HAVE_SELINUX -#include "selinux/label.h" +#include <selinux/label.h> struct selabel_handle *selinux_handle; -#endif extern int adb_server_main(int is_daemon, int server_port, int /* reply_fd */); @@ -133,7 +131,6 @@ int main(int argc, char **argv) { // Load up all the resources gui_loadResources(); -#ifdef HAVE_SELINUX if (TWFunc::Path_Exists("/prebuilt_file_contexts")) { if (TWFunc::Path_Exists("/file_contexts")) { printf("Renaming regular /file_contexts -> /file_contexts.bak\n"); @@ -170,23 +167,18 @@ int main(int argc, char **argv) { gui_msg("full_selinux=Full SELinux support is present."); } } -#else - gui_warn("no_selinux=No SELinux support (no libselinux)."); -#endif PartitionManager.Mount_By_Path("/cache", false); - bool Shutdown = false, Sideload = false; + bool Shutdown = false; string Send_Intent = ""; { TWPartition* misc = PartitionManager.Find_Partition_By_Path("/misc"); if (misc != NULL) { if (misc->Current_File_System == "emmc") { - set_misc_device("emmc", misc->Actual_Block_Device.c_str()); - } else if (misc->Current_File_System == "mtd") { - set_misc_device("mtd", misc->MTD_Name.c_str()); + set_misc_device(misc->Actual_Block_Device); } else { - LOGERR("Unknown file system for /misc\n"); + LOGERR("Only emmc /misc is supported\n"); } } get_args(&argc, &argv); @@ -254,7 +246,7 @@ int main(int argc, char **argv) { printf("\n"); } - if(crash_counter == 0) { + if (crash_counter == 0) { property_list(Print_Prop, NULL); printf("\n"); } else { @@ -309,7 +301,7 @@ int main(int argc, char **argv) { GUIConsole::Translate_Now(); // Fixup the RTC clock on devices which require it - if(crash_counter == 0) + if (crash_counter == 0) TWFunc::Fixup_Time_On_Boot(); // Run any outstanding OpenRecoveryScript |