diff options
author | Ethan Yonker <dees_troy@teamw.in> | 2018-03-09 18:22:54 +0100 |
---|---|---|
committer | Ethan Yonker <dees_troy@teamw.in> | 2018-03-09 18:22:57 +0100 |
commit | 53273ecce9119a988fdd959938d0d9dd64534420 (patch) | |
tree | 879a8937d8f290229159390c42ac38ade82c0e18 | |
parent | install: ignore build dates for A/B installs (diff) | |
download | android_bootable_recovery-53273ecce9119a988fdd959938d0d9dd64534420.tar android_bootable_recovery-53273ecce9119a988fdd959938d0d9dd64534420.tar.gz android_bootable_recovery-53273ecce9119a988fdd959938d0d9dd64534420.tar.bz2 android_bootable_recovery-53273ecce9119a988fdd959938d0d9dd64534420.tar.lz android_bootable_recovery-53273ecce9119a988fdd959938d0d9dd64534420.tar.xz android_bootable_recovery-53273ecce9119a988fdd959938d0d9dd64534420.tar.zst android_bootable_recovery-53273ecce9119a988fdd959938d0d9dd64534420.zip |
-rw-r--r-- | twrp.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
@@ -116,17 +116,13 @@ int main(int argc, char **argv) { gui_init(); printf("=> Linking mtab\n"); symlink("/proc/mounts", "/etc/mtab"); - if (TWFunc::Path_Exists("/etc/twrp.fstab")) { - if (TWFunc::Path_Exists("/etc/recovery.fstab")) { - printf("Renaming regular /etc/recovery.fstab -> /etc/recovery.fstab.bak\n"); - rename("/etc/recovery.fstab", "/etc/recovery.fstab.bak"); - } - printf("Moving /etc/twrp.fstab -> /etc/recovery.fstab\n"); - rename("/etc/twrp.fstab", "/etc/recovery.fstab"); + std::string fstab_filename = "/etc/twrp.fstab"; + if (!TWFunc::Path_Exists(fstab_filename)) { + fstab_filename = "/etc/recovery.fstab"; } - printf("=> Processing recovery.fstab\n"); - if (!PartitionManager.Process_Fstab("/etc/recovery.fstab", 1)) { - LOGERR("Failing out of recovery due to problem with recovery.fstab.\n"); + printf("=> Processing %s\n", fstab_filename.c_str()); + if (!PartitionManager.Process_Fstab(fstab_filename, 1)) { + LOGERR("Failing out of recovery due to problem with fstab.\n"); return -1; } PartitionManager.Output_Partition_Logging(); |