summaryrefslogtreecommitdiffstats
path: root/twrp.cpp
diff options
context:
space:
mode:
authorDees_Troy <dees_troy@teamw.in>2013-09-04 20:35:08 +0200
committerDees_Troy <dees_troy@teamw.in>2013-09-04 21:00:58 +0200
commit1669f89dd288e2ba226233a7fd62ea78ddb473c1 (patch)
treee6d72d724b31b6fa72e6d273a9c6c8661d5c9c2c /twrp.cpp
parentInitialize TWPartition::User_Rm_Rf to false in constructor (diff)
parentMerge "Update libpng API usage" (diff)
downloadandroid_bootable_recovery-1669f89dd288e2ba226233a7fd62ea78ddb473c1.tar
android_bootable_recovery-1669f89dd288e2ba226233a7fd62ea78ddb473c1.tar.gz
android_bootable_recovery-1669f89dd288e2ba226233a7fd62ea78ddb473c1.tar.bz2
android_bootable_recovery-1669f89dd288e2ba226233a7fd62ea78ddb473c1.tar.lz
android_bootable_recovery-1669f89dd288e2ba226233a7fd62ea78ddb473c1.tar.xz
android_bootable_recovery-1669f89dd288e2ba226233a7fd62ea78ddb473c1.tar.zst
android_bootable_recovery-1669f89dd288e2ba226233a7fd62ea78ddb473c1.zip
Diffstat (limited to 'twrp.cpp')
-rw-r--r--twrp.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/twrp.cpp b/twrp.cpp
index 32b411c93..d4e861daf 100644
--- a/twrp.cpp
+++ b/twrp.cpp
@@ -120,6 +120,18 @@ int main(int argc, char **argv) {
bool Cache_Wipe = false, Factory_Reset = false, Perform_Backup = false;
{
+ TWPartition* misc = PartitionManager.Find_Partition_By_Path("/misc");
+ if (misc != NULL) {
+ if (misc->Current_File_System == "emmc") {
+ set_device_type('e');
+ set_device_name(misc->Actual_Block_Device.c_str());
+ } else if (misc->Current_File_System == "mtd") {
+ set_device_type('m');
+ set_device_name(misc->MTD_Name.c_str());
+ } else {
+ LOGERR("Unknown file system for /misc\n");
+ }
+ }
get_args(&argc, &argv);
int index, index2, len;